Resource Workshop topics
Resource Workshop Help Contents

Error Messages

Identifiers

Constants

Defines

Projects

Resources

Accelerators

Bitmaps

Cursors

Dialog boxes

Fonts

Icons

Menus

String tables

User-defined resources

VERSIONINFO

Resource Script Language

Resource Workshop menus


How to start using Resource Workshop

If you're a first time Resource Workshop user, there are a few things you should know before you start: what projects and resources are, how to use them, and how to set preferences for the way Resource Workshop works.

Go to one of these Help screens for more information:

Projects

Resources

Setting preferences

Tips for the new user

Once you have background information, you can start using Resource Workshop. When you first begin, you need to create a new project. If you've already used Resource Workshop, you'll have an existing project that you can open. Then, you can add resources to your project.


Tips for the new user

Here are some tips that can help you get started:

-	Use the File menu to open existing projects or create new ones.

−	Use the status line at the bottom of the Resource Workshop window for explanations of functions.

-	The left side of the status line gives a brief explanation of currently highlighted menu commands.

-	The right side of the status line displays useful information when you use any of the graphics editors.

-	If you use identifiers, store them in identifier files. Avoid storing them in your resource files. Whenever you store something, Resource Workshop prompts you for the location in which to store it.

-	The Edit|Undo and Edit|Redo commands step back and forth through the previous tasks you have performed. Use File|Preferences to specify the maximum number of levels you can undo.

-	You don't need access to source code to work with an application's resources. Resource Workshop can decompile an existing executable file to let you make changes to its resources.

-	You can work with existing executable, dynamic link library (.DLL), and runtime font (.FON) files, but you can't create these file types with Resource Workshop.

See Also

How to start using Resource Workshop


Setting preferences

When you first use Resource Workshop, you should set preferences for how it works.

Choose File|Preferences to bring up the Preferences dialog box. where you set configuration options.

See Also

How to start using Resource Workshop


Overview of projects
Projects

A project is a collection of one or more resources. A project is stored in a file that contains one or more resources, or refers to files contains resources, or both. Typically, this project file is a resource compiler (.RC)script file.

When you first use Resource Workshop, you need to create a new project or open an existing one. Once the project is open, it's displayed in the Project window.

You'll need to save the project when you exit; Resource Workshop does not save the project automatically.


Creating a project

To create a new project:

1.	Choose File|New Project.

2.	In the New Project dialog box, turn on the Project File Type radio button that corresponds to the type of file on which you want to base your project.

3.	Click OK.

Resource Workshop displays your new project in the Project window. You're ready to add resources to your project. You can name your project when you save it.

See Also

Projects


Opening an existing project

An existing project is usually one that you created with Resource Workshop. It can also be an .RC file you created with other resource development software.

You can also work with the resources in any application developed for Windows 3.0 or higher, even if you don't have access to the source code. If you have access only to an executable file, Resource Workshop decompiles the file to let you make changes to the resources.

To open an existing project:

1.	Choose File|Open Project.

2.	In the Open File dialog box, specify the file containing the project you want to open.

3,	What Resource Workshop does next depends on whether the project is a binary file or a file containing resource data.

•	If the project is a binary file (an executable file, a .RES file, or a dynamic link library file), Resource Workshop decompiles the resources and shows you its progress on the left side of the status line.

•	If the project consists of a main .RC file and other files containing resource data, Resource Workshop reads the project file and then compiles each resource, showing you its progress in the Compile Status dialog box.

If Resource Workshop can't compile the project file, you'll see the Compiler Error dialog box. It shows you where the error and where it occurred.

4.	Once the project is compiled or decompiled, Resource Workshop displays the Project window with the resource listed in it.

When the project is open, you can add resources to it. Save the project when you're done.


Compiler Error dialog box overview
Compiler Error dialog box

The Compiler Error dialog box shows the compile error and where it occurred.

Error information

Information about the error is displayed at the top of the dialog box.

File name and line number information

The file name and line number information show where the error occurred.

Resource Script display box

The error is highlighted in the Resource Script display box.

Text Editor input box

The Text Editor input box is where you enter the name of the text editor you want to use.

Run Editor button

The Run Editor button brings up the text editor.


Error information

The compiler's internal error number and text of the error are at the top of the dialog box.


File name and line number information

The name of the project file and the line number of the error are displayed in the middle of the dialog box.


Resource Script display box

The resource script that contains the error is displayed in the Resource Script display box. Five lines of source script are displayed.


Text Editor input box (Compiler Error dialog box)
Text Editor input box

The Text Editor input box is where you specify the name of the text editor that Resource Workshop uses. The default text editor is the Windows Notepad editor, NOTEPAD.EXE.

You use the text editor to edit a resource's source script.


Run Editor button

The Run Editor button brings up the text editor specified in the Text Editor input box.

You can fix the error in the resource's source script. Save the file, exit the editor, and open the project again.


Project window

Once you've opened a new or existing project, Resource Workshop displays the Project window.

For a new project, the window is empty. You have to put resources into it by creating them or adding them as files.

For an existing project, you can see the:

-	complete list of files in the project

-	types of resources contained in each file

-	identifiers associated with resources

The Project window acts as an effective file management tool, making it easy to look at an overall view of a project. Even if your Resource Workshop project contains a large number of resources, you can quickly scan the project by scrolling through the Project window.

See Also

Project window display


Project window display
The Project window display

Use the View menu to determine how the Project window displays information. You can group resources by file or type; display the identifiers in the project; list the names of resources; display items in resources; and display all possible types of resources.

See Also

Status line


Status line

At the bottom of the Resource Workshop screen is a status line that displays information about commands and tools. It's divided into a left and right side.

The left side of the status line displays information about the currently highlighted menu command. For example, if you choose the Resource|New command, the status line displays "Create new resource."

The right side of the status line is active only when you're in the Dialog or Paint editors. It displays details about the editor and tool you're working with.


Saving a project

It's a good idea to save your work often. Resource Workshop provides you with a variety of save commands so you can choose exactly what you want to save and how to save it.

Choose the File menu and select one of these options:

-	File|Save Project saves everything in your current project. This the option you'll usually choose. If you're saving a new project that hasn't been named yet, Resource Workshop displays the Save File As dialog box where you can specify a name and directory.

Resource Workshop always saves the project file and any files it references. Resource Workshop can also save to a .RES file or bind the resources to an executable or dynamic link library file, if you turned on one or both of the Multi-save check boxes in the Preferences dialog box.

If your project is based on an .RC file, Resource Workshop compiles the project as part of the save process. This compiled version is stored in a file with an .RWS extension. The next time you open this project, Resource Workshop can save time by using the .RWS file instead of the .RC file.

-	File|Save File As lets you rename the current project when you save it. Resource Workshop displays the Save File As dialog box where you can enter the new file name.


Preprocessor Warning dialog box overview
Preprocessor Warning dialog box

The resource you're about to edit contains comments, preprocessor directives, and/or multi-field macros. If you edit the resource and save changes, the comments, preprocessor directives, and/or multi-field macros will not be saved.

-	Comments are pieces of text used to annotate a program. They are stripped from the source text before processing.

-	Preprocessor directives are also known as control lines. They are special statements that specify how your resource is processed.

-	Multi-field macros provide a mechanism for token replacement with or without a set of formal parameters.

Choose OK to edit the resource or Cancel to cancel the edit. Choose View Only to load the resource into the appropriate editor in display-only mode.


Overview of resources
Resources

Resources are data that define the visible portions of your Windows program. Resources provide a consistent user interface that makes it easy for users to switch from one Windows program to another.

In general, a Windows application's resources are separate from the program code, letting you make significant changes to the interface without even opening the file that contains your program code. This also lets different applications share the same set of resources, so that you don't have to reinvent all your favorite resources. Instead, you can use them over and over.

Here are the types of resources you can create with Resource Workshop:

Accelerators

Bitmaps

Cursors

Dialog boxes

Fonts

Icons

Menus

String tables

User-defined resources

See Also

Resource file types

Working with resources


Resource file types

A file you create and edit with Resource Workshop can be in either binary or text format. Resource Workshop can also read standard Windows file formats, such as files generated by the Microsoft Resource Compiler.

Here are the types of resource files you can create with Resource Workshop:

Bitmap (.BMP)

Cursor (.CUR)

Dialog (.DLG)

Font (.FNT)

Icon (.ICO)

Identifier

Resource compiler (.RC)

Resource (.RES)

Resource Workshop can open and modify the following types of files, but can't create them:

Device driver files

Dynamic link library files

Executable files

Runtime font files


Resource compiler files

A resource compiler (.RC) file is a script file containing one or more resources. The file can contain the resources in script form and references to other files that actually contain the resources. The resources in the referenced files can be in either binary format or script form, depending on the resource type.

In general, you should base all your Resource Workshop projects on at least one .RC file.

See Also

Resource file types


Resource files

A resource (.RES) file contains one or more compiled resources.

Typically, when creating a Windows program, you compile all resources for an application into a single .RES file, and then you bind the .RES file to the executable file as part of the linking process.

However, if you don't want to produce a .RES file, you don't have to. Resource Workshop will compile resource files and bind them directly to an executable file.

If you want to change the resources in a compiled binary file, Resource Workshop will decompile the file and let you make the changes, then save the resources back to the original file.

See Also

Resource file types


Executable and dynamic link library files

An executable (.EXE) or dynamic link library (.DLL) file is the ultimate destination for all resources you define with Resource Workshop. It's the file that users execute to run your program. In general, you'll compile the resource compiler file (.RC file) into the resource file (.RES file), then use your compiler to bind the .RES file to the executable or DLL file.

If you want to change the resources in a compiled binary file, Resource Workshop will decompile the file and let you make the changes, then save the resources back to the original file.

See Also

Resource file types


Driver files

A Windows device driver (.DRV) file is a special case of a dynamic link library (.DLL) file. You can edit the resources is one of these files just as you can in any .DLL file.


Dialog files

A dialog (.DLG) file is a script file that contains a description of one or more dialog boxes.

See Also

Resource file types


Icon files

An icon (.ICO) file contains one icon in binary format.

See Also

Resource file types


Bitmap files

A bitmap (.BMP) file contains one bitmap in binary format.

See Also

Resource file types


Cursor files

A cursor (.CUR) file contains one cursor in binary format.

See Also

Resource file types


Font files

Font files take two forms, binary and runtime.

-	A binary font (.FNT) file contains the definition of a customized font in binary format.

-	A runtime font (.FON) file is a resource-only dynamic link library that contains a font directory and one or more fonts. You must create .FON files outside of Resource Workshop using program development tools. However, once you've created a .FON file, you can use Resource Workshop to modify the file.

See Also

Resource file types


Identifier files

Identifier files are files in which you store your program's identifiers.

If you're writing a C program, you store identifiers in a header (.H) file. For a Pascal program, you store identifiers in a unit (.PAS) or include (.INC) file. Header files, units, and include files are identifier files.

You should set up identifier files before you start working on your resources. Then, as you create resources, you can put each identifier in the appropriate identifier file.

See Also

Resource file types

Using identifiers


Identifiers

Windows programs use a unique resource ID to identify each resource. However, numbers are not very descriptive. Identifiers are used to assign symbolic definitions to constant values.

For applications written in C, it's common to use #define statements to assign symbolic definitions to constant values. Applications written in Pascal use constant declarations for identifiers.

Identifiers are stored in identifier files.

An identifier must be unique. Only the first 31 characters are significant; Resource Workshop ignores any characters past the 31st character.


C header files

If your program is written in C, you use #define statements to assign names to resources. The #defines statements are stored in a header file.

You can also store type and structure definitions, program code, and comments in a header file. Resource Workshop ignores all data in the header file except for the #define statements and any preprocessor directives.

See Also

Identifier files


#define statement

The #define statement is a C program statement that you use to assign symbolic definitions to constant values. Use the #define statement to assign names to resources. If you use #define statements, store them in one or more header files.

See Also

#define directive

Identifiers


Pascal units and include files

If your program is written in Pascal, you can use constants to assign names to resources. Constants are stored in either a unit or an include file.

If you're storing constants in a unit, you can store only comments and compiler directives. Constants must be defined as untyped integer and long integer expressions. Only constant declarations are allowed in the interface section of the unit. The implementation section must be empty. Anything can follow the end keyword.

If you're storing constants in an include file, you can store only constant declarations, comments, and compiler directives.

See Also

Identifier files


constant declaration

A constant is a Pascal declaration that you use to assign symbolic definitions to constant values. Use a constant to assign names to resources. If you use constant declarations, you can store them in one or more units or include files.

See Also

Identifiers


Working with binary files

Resource Workshop allows you to load executable (.EXE) files, resource (.RES) files and dynamic link library (.DLL) as projects. What Resource Workshop does when you load one of these types of files is to decompile the resources in the file and show them to you as though they were part of a regular .RC file. When you're finished with your changes, Resource Workshop compiles the resources again into binary code and stores them in the original file.

Because the resources you're working with in this type of project are never stored as resource scripts, you can't assign any identifiers to the resource IDs. However, you can save the project as an .RC file. Then the resources can be saved as resource scripts, and you can assign identifiers to them.

Once you save the project as an .RC file, Resource Workshop won't automatically save the resources back to the original file. You have to enter the original file name in the Preferences dialog box in order to save the resources there as well.

The whole process works as follows:

1.	Choose File|Save File As. In the Save File As dialog box, enter the name of the new .RC file. When you press Enter or click OK to save the file, you'll see the name of the project change to the new file name.

2.	Choose File|Preferences. In the Preferences dialog box, enter the name of the original binary file as a Multi-Save option.

-	If the original binary file was a .RES file, turn on the .RES check box and enter the name in that text box.

-	If the original binary file was an executable or a .DLL file, turn on the Executable check box check box and enter the name in that text box.

3.	Choose File|Add To Project. In the Add File To Project dialog box specify an identifier file to hold the new identifiers. If the file you specify doesn't exist, Resource Workshop creates a new one for you.

When you quit and save the file, Resource Workshop saves both the .RC file and the binary file. If the binary file is an executable or a .DLL file, the changed resources are bound into it and are available immediately when you run that program.


Working with resources

When you display resources in the Project window, you'll see them listed by name. Use the mouse or the arrow keys to select the resource.

You can do the following with resources:

-	Add a resource to a project

-	Delete a resource

-	Edit a resource

-	Rename a resource

-	Save a resource

-	Specify resource memory options


Editing a resource

When you open a resource, Resource Workshop also opens an editor for the resource. You have the choice of two types of editors:

•	A resource editor where you work on the resource in its regular form.

•	A text editor where you edit only the source code for the resource.

You can pick which type of editor you want from the Resource menu. The Resource|Edit command selects a resource editor, and the Resource|Edit As Text command selects the internal text editor.

See Also

Working with resources


Using a Resource editor

You can edit any resource in a project by double-clicking the resource. You can also edit a resource by clicking the resource name in the Project window and choosing Resource|Edit.

In either case, Resource Workshop loads the appropriate resource editor for the resource you choose:

-	For an accelerator resource, Resource Workshop loads the Accelerator editor.

-	For a dialog box resource, Resource Workshop loads the Dialog editor.

-	For a menu resource, Resource Workshop loads the Menu editor.

-	For an icon, bitmap, cursor, or font resource, Resource Workshop loads the Paint editor.

-	For a string table resource, Resource Workshop loads the String editor.

See Also

Editing a resource


Using the text editor

The text version of a resource is also called "source code" or "script."

You can edit the text version of any resource. To edit the text version of a resource,

1.	Click the resource in the Project window.

2.	Choose Resource|Edit As Text. Resource Workshop opens its internal text editor and displays the script for the resource.

The default text editor, NOTEPAD.EXE:

-	Uses the Del, Home, End, PgUp, PgDn, and BkSp keys as you would expect.

-	Is always in insert mode.

-	Can't use tabs, but you don't want to spend any time formatting, anyway, because Resource Workshop is likely to rearrange the text for you when it compiles the text you enter.

When you're finished making changes, choose Control|Close. Click "Yes" in response to the prompt "Resource has changed. Compile?" You can also use the Compile menu to compile your resource before you exit the text editor.

Resource Workshop compiles your changes and saves them. If there's a syntax error, you are put back in the text editor so you can correct the error.

See Also

Editing a resource


Adding resources to a project
Adding a resource to a project

You can add a resource to a project as a file reference or you can add it directly to the project.

Adding a resource stored in a file

Use the File|Add To Project command to add a resource stored in an external file to the current project. You can use this command to add an existing resource  or add a new file for a new resource.

Adding a resource directly to a project

Use the Resource|New command to create a new resource in a project as a resource script.

See Also

Working with resources


Adding an existing resource to a project

To add an existing resource stored in an external file to a project,

1. Open the project you want to work with.

2. Choose File|Add To Project. Use the Add File To Project dialog box to specify the file name of the resource you want to add to the project.

3.	Click OK.

If you choose Vie|w|By File, you'll see the file name listed and under it the resource name. Any changes you make in the project to this resource are reflected in the original resource file.

See Also

Adding resources


Adding a new resource to a project
Adding a new file for a new resource to a project

To add a new file for a new resource to a project,

1. Open the project you want to work with.

2. Choose File|Add To Project. Use the Add File To Project dialog box to specify the file name of the resource you want to add to the project.

3.	Click OK.

When you click OK, Resource Workshop tells you that the file doesn't exist and asks you if you want to create it. If you do, press Enter or click OK, and Resource Workshop creates a file of the appropriate type.

You can use this option to create a new identifier file. Select the file type you want and enter the new name with the correct extension. Resource Workshop creates the new file for you.

See Also

Adding resources


Creating a new resource

To create a new resource in a project as a resource script,

1.	Use the Resource|New command.

2.	In the New Resource dialog box, double-click the type of resource you want to create.

3.	This step depends on the type of resource you're adding:

−	If you create an accelerator, a menu, a dialog, a string table, an RCDATA resource, or a user-defined resource, Resource Workshop puts an entry for the resource in the Project window and opens the appropriate Resource editor with the new resource loaded in.

-	If you create an icon, a cursor, a bitmap, or a font, Resource Workshop displays the Storage Format dialog box where you choose the storage format for your resource.

See Also

Adding resources


Renaming a resource

It's easy to rename a resource in your project:

1.	Click the resource in the Project window to select it.

2.	 Choose the Resource|Rename command. Resource Workshop displays the Rename Resource dialog box where you rename your resource.

3.	Enter the new resource name in the New Name input box.

3.	Click OK. Resource Workshop asks you if you want to create a new identifier by that name.

-	Answer No if you want your resource to be a named type. Using a named type is slower when you run your program.

-	Answer Yes if you want to assign a resource ID to the resource. This speeds up calls to the resource. If you answer "Yes," the New Identifier dialog box is displayed where you create a new identifier.

See Also

Working with resources


Deleting a resource

To delete a resource from a project, select it in the Project window, then do one of the following:

-	Press the Del key or choose Edit|Delete to completely delete it.

-	Choose Edit|Cut to cut the resource into the Windows clipboard so you can paste it elsewhere.

See Also

Working with resources


Specifying resource memory options

Resource Workshop makes it easy to specify how each resource in your project should be managed in memory. It's better to leave the memory settings at their defaults unless you're an experienced Windows programmer.

To specify memory options:

1.	Select the name of the resource in the Project window. You can click the name with the mouse or use the arrow keys to select it.

2.	Choose Resource|Memory Options to open the Resource Memory Options dialog box.

3.	Check one or more of the Memory Options check boxes.

See Also

Working with resources


Using identifiers

Windows requires that every resource have a resource ID associated with it. You can use Resource Workshop to assign actual integers as resource IDs, but it's more likely that you'll want to use an identifier to represent the resource ID.

If you use identifiers, you can:

Add an identifier file

Add, edit, and delete identifiers

Add identifiers with a Resource editor


Resource ID

A resource ID is a unique integer that identifies a Windows resource. You can refer to a resource ID by using an integer or an identifier.

Typically, you'll use an identifier to refer to a resource for two reasons:

-	An identifier is more descriptive than a number.

-	An identifier can be put in a separate file, an identifier file, and changed in just that one location.


Adding an identifier file

If you don't already have a header file associated with your C source code, or a unit or include file associated with your Pascal program, you can create a new identifier file with Resource Workshop.

To add an identifier file to your project use the File|Add To Project command. Specify the file name in the Add File To Project dialog box.

See Also

Using identifiers


Adding identifiers with a Resource editor

Most often, you'll add an identifier to a file by creating a new identifier in a Resource editor. When you enter a new identifier name in an editor, Resource Workshop asks you if you want to create a new identifier. If you click Yes, you'll see the New Identifier dialog box, where you add the new identifier.

You can also add a new identifier to a file directly, without first associating the identifier with a resource. See the Adding, editing, and deleting identifiers Help screen.

See Also

Using identifiers


Adding, editing, and deleting identifiers

Before you can add, edit, or delete, identifiers, you need to display them.

Once you've displayed the identifiers you want to work with, you can use the buttons on the right side of the dialog box to add, change, or delete identifiers.

-	Click the New button to display the New Identifier dialog box where you can add new identifiers.

If your project contains more than one identifier file, make sure you use the File drop-down box to choose the file where you want to insert the identifier.

-	Click the Change button to display the Change Identifier dialog box  where you can change an identifier's value.

-	Click the Delete button to delete the selected identifier.

See Also

Using identifiers


Displaying identifiers

To display identifiers,

1.	Open the project you want to work with.

2.	Click on the Project window.

3.	Choose Resource|Identifiers. Resource Workshop displays the Identifiers dialog box where identifiers are listed.

4.	Use the View radio buttons to control which identifiers Resource Workshop displays.


Saving resources and resource files

It's a good idea to save your work often. Resource Workshop provides you with a variety of save commands so you can choose exactly what you want to save and how to save it.

-	Choose File|Save File As to rename the current resource file when you save it. Resource Workshop displays the Save File As dialog box where you can enter the new file name.

-	Choose Resource|Save Resource As to rename a resource when you save it. Resource Workshop displays the Save Resource As dialog box where you can enter the new file name and choose the appropriate file type.

When you click OK, Resource Workshop asks you if you want the reference in the project file to refer to the external file from now on. Click Yes to replace the resource script or file reference in the project file with a reference to the new file. Click No to save the resource file without changing the project file.

See Also

Working with resources


Overview of menus
Menus

Most Windows applications include a menu bar. Each choice in the menu bar produces a pop-up menu that shows another list of choices. Resource Workshop provides you with a Menu editor that makes it easy to create and edit menus.

When working with a menu you perform four primary tasks. You

Start the Menu editor

Customize a menu

Test a menu

Save a menu


Starting the Menu editor

Whether you create a new menu or edit an existing one, you'll use the Menu editor. When the Menu editor starts, it displays a menu that's ready for you to customize.

How you start the Menu editor depends on whether you want to create a new menu or edit an existing one.

If you're creating accelerators for your menu, you should start the Menu editor and load in the menu you're working on. To let users know what accelerators they can use, you can add accelerator text to your menus.


Menu editor

The Menu editor uses three panes to display editing information. You can change their positions with the View menu and you can create new menu entries with the Menu menu.

You use the Menu editor to customize menus.


Menu editor panes

The Menu Editor provides you with three different views of the menu you're editing:

-	An outline pane that shows the menu's pseudo-code

-	A dialog box pane where you customize the currently highlighted line in the menu

-	A test menu pane where you test your menu

Use the Tab key to move from pane to pane.

See Also

Menu editor


Outline pane (Menu editor)
Outline pane

The Outline pane, on the bottom right in the default configuration, shows you the outline of the menu. When you add menu items, pop-up commands, and separators, they appear in pseudo-code in this pane.

The top line is the name of the menu, and the other lines are statements defining the menu. To edit a menu entry, you select a statement in this pane.

You can move around in this pane by:

-	Using the mouse to position on any line in the outline

-	Selecting a menu command in the test menu, which moves you to that same command in the outline

Use F6 or Shift-F6 to move between the dialog box pane and the Outline pane.

The outline you see on the Menu editor doesn't show all parameters for each statement. It just shows you pseudo-code that's designed to make it easy to work with the structure of your menu. If you want to see the complete code, edit the menu's resource script.

See Also

Menu editor panes


Dialog box pane (Menu editor)
Dialog box pane

The Menu editor dialog box pane is on the left side of the Menu editor screen. The dialog box lets you specify information about the statement that's currently highlighted in the Outline pane. Your choices define the characteristics of the highlighted menu statement.

See Also

Menu editor panes


Test Menu pane

The Test Menu pane, above the Outline pane in the default configuration, shows your menu and lets you test it. The Menu editor automatically updates the test menu as you make changes to your outline.

See Also

Menu editor panes


Creating a menu

To create a new menu,

1.	Open the project to which you want to add the menu.

2.	Choose Resource|New to create a new resource for that project. The New Resource dialog box appears.

3.	In the Resource Type list box scroll to the MENU entry, then either double-click it or click MENU and then click OK.

Resource Workshop displays the Menu editor with a default menu you can begin customizing.

See Also

Starting the Menu editor


Editing a menu
Editing an existing menu

To edit an existing menu, open the project in which the menu is stored and do one of the following:

-	Double-click the menu resource name in the Project window.

-	Highlight the menu resource name and choose Resource|Edit.

Resource Workshop displays the Menu editor with the menu you've chosen loaded in. You can customize your menu.

See Also

Starting the Menu editor


Customizing a menu

Once you have a menu loaded into the Menu editor, you're ready to customize it. You customize your menu by adding statements for:

-	menu items

-	pop-up commands

-	menu separators

You can also use the three standard pop-up menus (Edit, File, and Help). In addition, you can add accelerator text to your menus.

When you customize your menu, you can move and copy menu statements and delete them.

It's easy to undo and redo changes with the Edit|Undo and Edit|Redo commands.


Adding a menu statement

Whenever you add a new statement for a menu item, pop-up command, or menu separator, position the cursor in the Outline pane on the line preceding where the statement is to go.

If you want to insert a statement before the first statement in the outline, move to the top line (the title line).

When you've decided where the new statement goes, and you've highlighted the appropriate line, you can add a new statement with the Menu menu. Three standard pop-up menus (File, Edit, and Help) are provided.

See Also

Customizing a menu


Moving and copying a menu

You can use Edit|Cut, Edit|Copy, and Edit|Paste to move and copy statements in the Outline pane.

To move or copy a statement, highlight the statement and choose Edit|Cut or Copy. Then highlight the statement after which you want to insert the statement and choose Paste.

See Also

Customizing a menu


Customizing a menu item

A menu item, or command, causes the application to initiate an action. Usually, menu items are contained in pop-up menus.

Before you can create a menu item, you need to choose where to insert it. To edit an existing menu item, you need to first select it in the Outline pane with the mouse or the arrow keys.

See Also

Customizing a menu


Inserting new choices in your menu

Before you add a new menu item, pop-up menu, or menu separator to your menu, you need to decide where you want it to appear in the menu and highlight the previous line in the Outline pane.

In general, if you're putting a new menu choice after another statement, you highlight the existing statement and insert the new one.


Creating a menu item

Once you've decided where to insert the menu item, you can create is as follows:

1.	Highlight the appropriate line in the Outline pane. The new menu item is inserted after the highlighted line.

2.	Press Ins or Choose Menu|New Menu Item. The Menu editor creates a new menu item, gives it a default name ("Item") and menu ID, and highlights it in the outline.

3.	Use the dialog box to define the new menu item.

See Also

Customizing a menu item


Editing a menu item

Once you've highlighted a menu item in the Outline pane, you use the Menu editor dialog box to customize it.

You can change the text that displays in the menu, change the menu's numeric ID, and put a check mark next to the menu if it's a toggle.

See Also

Customizing a menu item


Customizing a pop-up menu
Customizing a pop-up command

A pop-up command produces a menu that displays more choices. In most Windows applications, all items in the menu bar across the top of the window are pop-up commands.

Before you can create a pop-up menu, you need to choose where to insert it.

To edit an existing pop-up menu, you first need to select it in the Outline pane with the mouse or the arrow keys.

See Also

Customizing a menu


Creating a pop-up menu
Creating a pop-up command

Once you decide where to insert a pop-up command, here are the basic steps for adding it:

1.	Highlight the appropriate line in the Outline pane. The new pop-up command is inserted after the highlighted line.

2.	Press Ctrl+P or choose Menu|New Popup. The Menu editor creates a new pop-up menu and highlights it in the outline.

3.	Use the dialog box to define the new pop-up menu.

See Also

Customizing a pop-up command


Editing a pop-up menu
Editing a pop-up command

Once you've highlighted a pop-up menu in the Outline pane, you use the Menu editor dialog box to customize it.

You can change the text that displays in the menu, select the menu type, and choose the menu's initial state.

See Also

Customizing a pop-up command


Defining a menu separator

A menu separator is a line that separates different groups of choices in a pop-up menu.

Before you add a menu separator, you need to choose where to insert it.

See Also

Customizing a menu


Adding a menu separator

Once you decide where you want a separator, here are the basic steps for adding it to your menu:

1.	Highlight the appropriate line in the Outline pane. The new menu separator is inserted after the highlighted line.

2.	Press Ctrl+S or choose Menu|New Separator.

You don't have to set any of the options in the dialog box.

See Also

Menu separators


Using the standard menus

Resource Workshop provides three standard pop-up menus that are used by most Windows applications: File, Edit, and Help.

-	To insert a File pop-up, choose Menu|New File Popup.

−	To insert an Edit pop-up, choose Menu|New Edit Popup.

-	To insert a Help pop-up, choose Menu|New Help Popup.

See Also

Customizing a menu


Deleting a menu statement

Use Edit|Cut or Edit|Delete to delete statements from the Outline pane. You can also use the Del key.

Highlight the statement you want to delete, then press Del, or choose Edit|Cut or Edit|Delete.

You can't delete END POPUP statements. If you want to delete a pop-up and all the items contained in a pop-up, delete the BEGIN POPUP statement.

See Also

Customizing a menu


Adding accelerator text to menus

To let users know what accelerators they can use, you can add accelerator text to your menus. For example, if your application includes a Shift+Del accelerator that duplicates the Cut command on the Edit menu, you can add the text "Shift+Del" next to that command.

Windows applications generally use the plus sign to show key combinations, like Shift+Del or Ctrl+Shift+F4. Use the tab character (\t) to separate the menu title from the accelerator text (for example, Cut\tShift+Del).

When you add accelerator text to menus, you'll use these input boxes:

-	The Item Text and the Item ID input boxes in the Menu editor dialog box.

-	The Command input box in the Accelerator editor dialog box.


Testing a menu

The Menu editor gives you immediate testing capability. The test menu is updated as you make changes to your menu, so you can test changes whenever you want.

Use the Test Menu pane to test changes. For example, if you add a new menu command to a pop-up menu, click the new command in the test menu to see how your new command looks.

The Menu editor also has a built-in debugging tool that you can use to test for duplicate menu item IDs. Choose Menu|Check Duplicates to search for duplicate values. If the Menu editor finds duplicates, it displays a dialog box with the message "Duplicate command value found."

When you close this message box, the Menu editor highlights the statement with the duplicate value. Determine whether the menu ID is an identifier or a numeric value by looking at the Item ID input box.

−	If the menu ID is a number, enter a new number that doesn't conflict with the other menu IDs.

-	If the menu ID is an identifier, choose Resource|Identifiers to display the Identifiers dialog box where you can change the identifier.

See Also

Menus


Saving a menu

It's a good idea to save your changes as you go along, rather than waiting for Resource Workshop to prompt you when you close the project.

There are two primary options you can use to save changes you've made to a menu. You can

-	Save the entire project

-	Save the menu in a resource script file


Saving a menu in a resource script file

Saving the entire project also saves the menu resource you're working on.

You can save just the menu resource by choosing Resource|Save Resource As. This command brings up the Save Resource As dialog box where you enter the file name for the menu resource.

To add the file to the project as an external resource, choose File|Add to Project.

See Also

Saving menus


Editing the resource script of a menu

The Menu editor lists the pseudo-code for your menu in the Outline pane, but this window doesn't list complete source code statements with all parameters.

To work with the resource script for a menu, select the menu name from the Project window by clicking it. Then choose Resource|Edit As Text. Resource Workshop brings up the source script for the resource in its internal text editor.

See Also

Menus


Menu editor dialog box overview
Menu editor dialog box

The Menu editor dialog box is where you specify information about the statement that's highlighted. Your choices define the characteristics of the highlighted menu statement.

Use the mouse, Tab, or Shift+Tab keys to position on the field you want.

Item Text input box

The Item Text input box is where you specify the name of a menu or pop-up command.

Item ID input box

The Item ID input box is where you enter a unique ID for the menu item.

Item Type radio buttons

The Item Type radio buttons choose the type of menu you're adding.

Break Before radio buttons

The Break Before radio buttons control the format of menu commands.

Initial State radio buttons

The Initial State radio buttons choose the menu item's initial state.

Checked check box

The Checked check box turns the initial state of the command to On.


Item Text input box

The Item Text input box is where you enter the name of a menu command or pop-up command. If you want the user to choose the command from the menu by typing one of the letters in the command, put an ampersand (&) immediately before that letter. Windows will display the command with that letter underlined.

If you plan to link an accelerator to this command, you can add accelerator text to the menu. Use the tab character (\t) to separate the menu title from the accelerator text. For example, Cut\tShift+Del means that the accelerator Shift+Delete is assigned to the menu command Cut. Note that pop-up menus don't have accelerator keys.


Item ID input box

The Item ID input box applies only to menu items. This input box is where you enter the menu item's unique resource ID. Resource Workshop creates a default value for the ID that's different from all other menu IDs in this menu. You can accept this value or choose your own by entering a unique number or name.

If you type a name, Resource Workshop checks to see if an identifier by that name already exists. If one doesn't exist, you see a prompt asking you if you want to create one. If you choose to create a new identifier, Resource Workshop shows you a dialog box that displays the current value it assigned to the identifier. You can accept this value or type a new number and have Resource Workshop create the identifier for you.

If you're add accelerator text to this command, you need to enter this value in the Command input box in the Accelerator editor dialog box.


Item Type radio buttons

The Item Type radio button selects the menu type you're creating. You can choose between an actual menu item and a menu separator.

Pop-up

Turn the Pop-up radio button on if you're creating a pop-up menu.

Menu Item

Turn the Menu Item radio button on if you're creating a menu item.

Separator

Turn the Separator radio button on if you're creating a menu separator.


Break Before radio buttons

The Break Before radio buttons control the format of menu commands in the menu bar and in pop-up menus.

No Break

Turn the No Break radio button on if you don't want a break before this menu item.

Menu Bar Break

Turn the Menu Bar Break radio button on if you want to start a new line in the menu bar, or a new column in a pop-up.

Menu Break

Turn the Menu Break radio button on to start a new line in the menu bar. In a pop-up menu, this option starts a new column and draws a vertical line to separate the columns.

Help Break

Turn the Help Break radio button on to move the menu item to the far right of the menu bar. Use this option only with top-level menu items in the menu bar.


Initial State radio buttons

The Initial State radio buttons select the menu item's initial state.

Enabled

Turn the Enabled radio button on to enable the menu item or pop-up, so that it will work when the user chooses it.

Disabled

Turn the Disabled radio button on to disable the menu item or separator. The user won't be able to distinguish between Enabled and Disabled items; they'll look the same on the menu.

Grayed

Turn the Grayed radio button on to disable the menu item or pop-up and gray the displayed text. The shading lets the user know the menu item is not currently available.


Checked check box

If the menu item will toggle on and off, turn the Checked check box on. This places a checkmark next to the menu item. A checkmark means that the command is on.

Since menu bar commands and pop-up menus don't toggle, this option only applies to menu items on pop-up menus.


Overview of dialog boxes
Dialog boxes

A dialog box gives the user a way to interact with your application, A dialog box is usually a pop-up window that lets the user specify information (files to open, colors to display, text to search for, and so on).

A dialog box usually contains controls, such as buttons, text boxes, and scroll bars. Controls let the user specify information, but can also be used to display static text and graphics in a dialog box.

Resource Workshop's Dialog editor makes it easy to create and edit dialog boxes. When you work with dialog boxes, you:

Start the Dialog editor

Customize a dialog box

Test the dialog box

Save the dialog box


Starting the Dialog editor

Whether you create a new dialog box or edit an existing dialog box, you'll use the Dialog editor. When the Dialog editor starts, it displays a dialog box that's ready for you to customize.

How you start the dialog editor depends on whether you want to create a new dialog box or edit an existing one.

Customizing the Dialog editor

Before you work on a dialog box, you can customize the Dialog editor by choosing Options|Preferences. You'll see the Preferences dialog box, where you can set configuration options.


Dialog editor (overview)
The Dialog editor

The Dialog editor is where you create and edit dialog boxes.

The Dialog editor displays:

-	The Control, Align, and Option menus you use to manipulate the dialog box and its controls

-	An empty dialog box on the left side of the screen

-	The Tools palette that contains control and mode tools

-	The Alignment palette you use to align controls

-	The Caption window where you add a new caption to your dialog box


Tools palette (Dialog editor)
Tools palette

The Tools palette is displayed on the right side of the Dialog editor screen. The palette makes it easy to create the types of controls you want.

The two rightmost columns of the Tools palette are the control tools. The left column contains mode tools that put the Dialog editor in various modes.


Control tools

Control tools are displayed in the two right columns of the Tools palette.  Control tools make it easy to work with controls.

To put a control in your dialog box, just select a control tool with your mouse and drag it to your dialog box. Double-click to place the control.

Here's a list of the control tools on the Tools palette:

Black Frame

Black Rectangle

Check Box

Combo Box

Edit Text

Group Box

Icon

Horizontal Scroll Bar

List Box

Push Button

Radio Button

Static Text

Vertical Scroll Bar

The Custom Control icon in the lower right corner of the Tools palette brings up the New Custom Control dialog box, where you add a new control to your dialog box. Custom controls are only active if you've used Options|Install Control Library to install a custom control library.


Black Rectangle tool

The Black Rectangle tool puts a static control icon that appears as a black rectangle in your dialog box.

A black rectangle is a static control.


Check Box tool

The Check Box tool puts a rectangular button with text to the left or right in your dialog box.

When a check box is turned on, an X appears on the button. When a check box is turned off, the X disappears. Check boxes are often used to represent Boolean (on/off) data.

A check box is a button control.


Combo Box tool

The Combo Box tool puts a box in your dialog box that's a combination of a list box and a static control or an edit control.

See Also

Combo Box controls


Custom Control icon
Custom Control

The Custom Control icon brings up the New Custom Control dialog box, where you can put a control in your dialog box that doesn't fit into any of the predefined Window types.

If you've installed a Borland custom control library, you'll see the Borland custom control tools in the far right column of the Tools palette.

See Also

Custom Controls


Edit Text tool

The Edit Text tool puts a rectangle in your dialog box. The user can enter text from the keyboard into this box.

See Also

Edit Text controls


Group Box tool

The Group Box tool puts a rectangular box around a group of controls in your dialog box. It's used to visually group controls together. You can include a caption in the upper left corner of the group box.

A group box is a button control.


Icon tool

The Icon tool puts an icon in your dialog box. It is a static control.


Horizontal Scroll Bar tool

The Horizontal Scroll Bar tool puts a horizontal rectangle with a direction arrow on each end in your dialog box.

A horizontal scroll bar is a scroll bar control.


List Box tool

The List Box tool puts a rectangle in your dialog box. The rectangle usually includes a list of strings. It can also contain a visual representation of the list.

Usually, a user can browse through the list box, then select one or more items.

See Also

List Box controls


Push Button tool

The Push Button tool puts a rectangular button in your dialog box. The user "presses" the button to select an action. Push buttons always contain text, so you need to specify a caption for each one.

A push button is a button control.


Radio Button tool

The Radio Button tool puts a circular button with text on its left or right side in your dialog box. When the button is turned on, a solid dot fills the circle.

A radio button is a button control.


Static Text Static tool
Static Text tool

The Static Text tool puts text in your dialog box. This is a static control.


Vertical Scroll Bar tool

The Vertical Scroll Bar tool puts a vertical rectangle with a direction arrow on each end in your dialog box.

A vertical scroll bar control is a scroll bar control.


Black Frame tool

The Black Frame tool puts a rectangular empty frame in your dialog box. The frame is the color of the current background color and, therefore, invisible.

This a static control.


Mode tools

Mode tools are displayed on the left column of the Tools palette. Mode tools put the Dialog editor in various modes.

Here's a list of the Mode tools on the Tools palette:

Duplicate

Pick

Set Groups

Set Order

Tab Set

Test

Undo


Pick tool (Dialog editor)
Pick tool

You use the Pick tool to select one or more controls in your dialog box. To select a single control, simply click it. To select more than one control, click and drag your mouse around the controls you want to select.

When you select the Pick tool, your cursor is the shape of an arrow. Choose the Pick tool to exit another mode and return your cursor to the arrow shape.


Tab Set tool

The Tab Set tool (the horizontal arrows icon) lets you specify which controls are tab stops, so that users can use Tab to move to the control.


Set Groups tool

The Set Groups tool (the G icon) lets you define a group of controls.


Set Order tool

Use the Set Order tool (the 1,2 icon) to reorder controls.


Test tool

Use the Test tool to test the controls in your dialog box.


Duplicate tool

Use the Duplicate tool (the box and arrow icon) to add multiple copies of a control to your dialog box.


Undo tool

Use the Undo tool to undo any editing you do in the Dialog editor. The Undo tool works on commands that affect groups of controls as wells as commands that change single controls.


Alignment palette

The Alignment palette makes it easy to align controls.

First select the controls you want to align and place them in your dialog box. Then align the controls with a tool from the Alignment palette.

Here are the tools you can choose from:

Bottom

Horizontal Center (Dialog Box)

Horizontal Center (Sizing Frame)

Left

Right

Top

Vertical Center (Dialog Box)

Vertical Center (Sizing Frame)

You can also use the Align Controls dialog box to align controls.


Left tool

The Left tool moves controls horizontally so they're aligned along the left side of the sizing frame.


Horizontal Center (Sizing Frame) tool

The Horizontal Center tool moves controls so that they're horizontally aligned in the center of the sizing frame.


Right tool

The Right tool moves controls horizontally so they're aligned along the right side of the sizing frame.


Horizontal Center (Dialog Box) tool

The Horizontal Center Dialog Box tool moves the sizing frame and the selected controls so that they're horizontally centered in the dialog box.


Top tool

The Top tool moves controls vertically so they're aligned along the top of the sizing frame.


Vertical Center (Sizing Frame) tool

The Vertical Center tool moves controls so that they're vertically aligned in the center of the sizing frame.


Bottom tool

The Bottom tool moves controls vertically so they're aligned along the bottom of the sizing frame.


Vertical Center (Dialog Box) tool

The Vertical Center Dialog Box tool moves the sizing frame and the selected controls so that they're vertically centered in the dialog box.


Caption window

Use the Caption window to add a caption to your dialog box or to a dialog control.

Here's how:

1.	Click the title bar of the dialog box to select it.

2.	Press F6 to move to the Caption window. Type in the caption.

3.	Press Enter. The new caption appears on the dialog box title bar.

You can also use the Window Style dialog box to add a caption.


Creating a dialog box

To start the Dialog editor to create a new dialog box:

1.	Open a project.

2.	Choose Resource|New. Resource Workshop displays the New Resource dialog box.

3.	 In the Resource Type list box, scroll down to DIALOG and select it.

4.	Click OK to place the dialog box in the current project file.

You're now in the Dialog editor, where you can customize  your dialog box.


Editing a dialog box

To edit a dialog box that already exists in a project file,

1.	Open the project that contains the dialog box you want to edit.

2.	Locate the dialog box you want to edit in the Project window and double-click it.

You're now in the Dialog editor, where you can customize  your dialog box.


Customizing a dialog box

Once in the Dialog editor, you can define your dialog box. You can also add, change, group, reorder, move, resize, or delete dialog controls so that your dialog box functions the way you want it to.


Defining a dialog box

With Resource Workshop, you define your dialog box. You can:

-	add a caption

-	choose a window type and frame style

-	specify fonts

-	specify the dialog box style

-	size the dialog box

-	include a menu

-	assign a custom class to your dialog box

You can also make any changes you want to the dialog box window. You can

−	Resize the dialog box window by dragging the mouse cursor from the appropriate edge or corner.

-	Move the dialog box window by dragging the mouse cursor from within the window, or use the arrow keys.

-	Press Enter or double-click anywhere in the dialog box window to display the Window Style dialog box.


Adding a caption to a dialog box
Adding a caption

To add a caption to a new dialog box,

1.	Open the Window Style dialog box by double-clicking the title bar or outer edge of the dialog box, or by selecting the window and pressing Enter.

2.	Type the caption that you want to appear at the top of your dialog box in the Caption input box.

3.	Turn on the Caption radio button.

4.	Click OK.

You can also enter a cation in the Caption window.

See Also

Defining a dialog box


Including a menu in a dialog box
Including a menu

Because it's really a window, a dialog box could include a menu, but seldom does.

To include a menu in your dialog box,

1.	Define the menu as a separate resource and add it to the project. Remember the value you enter in the Item Text or Item ID input boxes.

2.	Open the Dialog editor for the dialog box you want to add the menu to.

3.	Open the Window Style dialog box by double-clicking the title bar or outer edge of the dialog box, or by selecting the box and pressing Enter.

4.	Type the menu's resource name or numeric ID in the Menu input box.

See Also

Defining a dialog box


Choosing a window type for a dialog box
Choosing a window type

You choose a window type for your dialog box by turning on one of the Window Type radio buttons in the Window Style dialog box.

See Also

Defining a dialog box


Choosing a frame style for a dialog box
Choosing a frame style

The frame style of the dialog box determines the appearance of the dialog box frame and whether the dialog box displays a title bar at the top.

You choose a frame style for your dialog box by turning on one of the Frame Style radio buttons in the Window Style dialog box.

See Also

Defining a dialog box


Specifying dialog box fonts
Specifying fonts

To choose how text is displayed in your dialog box,

1.	Open the Window Style dialog box by double-clicking the title bar or outer edge of the dialog box, or by selecting the window and pressing Enter.

2.	Click the Fonts button to open the Select Font dialog box, where you select a typeface, size, and style for text in your dialog box.

Notice the characters displayed at the bottom of the Select Font dialog box. They show you the current typeface, size, and styles you've selected.

See Also

Defining a dialog box


Specifying the dialog box style

The dialog box style determines what the dialog box looks like and how the user can work with it.

You choose a dialog style for your dialog box by turning on one or more of the Dialog Style check boxes in the Window Style dialog box.

See Also

Defining a dialog box


Sizing a dialog box

To size a dialog box, you can select it and drag the appropriate edge or corner. The Dialog editor makes it easy to resize your dialog box with the Align menu. Here's how:

1.	Select the dialog box.

2.	Choose Align|Size or press Alt and double-click the mouse. You'll see the Size Dialog dialog box where you specify the starting point, the height, and the width of the dialog box.

You can undo the sizing by choosing Edit|Undo (or press Alt+Backspace). You may have to choose Undo more than once.

See Also

Defining a dialog box


Assigning a custom class to a dialog box

If you're an experienced Windows programmer, you might want to assign a custom class to your dialog box. Then you can process dialog box messages with your own windows procedures instead of using Windows 3.0 procedures.

To assign a custom class to a dialog box;

1.	Open the Window Style dialog box  by double-clicking the title bar or outer edge of the dialog box, or by selecting the window and pressing Enter.

2.	 Type the class name in the Class input box.

See Also

Defining a dialog box


Types of controls
Controls

Controls let users interact with dialog box data. In general, controls fall into these categories:

Buttons

Combo Boxes

Custom Controls

Edit Text

List Boxes

Scroll Bars

Static Controls

Once you've defined your dialog box, you can work with controls to make the dialog box do what you want it to.


Button controls

Here are the types of buttons you can include in a dialog box:

Button Control	Description

3 State	Identical to a check box, but includes a third possible state: The button can be dimmed to show that its state is unknown or indeterminate. It's the application's responsibility to check, uncheck, and dim the box.

Auto 3 State	Identical to a 3 state button, but Windows does the checking, unchecking, and dimming instead of the application program.

Auto Check Box	Identical to a check box, but Windows does the checking and unchecking instead of the application.

Auto Radio Button	Identical to a radio button, but Windows fills or clears the dot instead of the application.

Check Box	A rectangular button that can include text to the left or right of the button. The box is marked with an X when it's selected. It's the application's responsibility to check and uncheck the box when the user turns the box on or off.

Default Push Button	Identical to a push button, but also includes a bold border indicating that it's the default response if the user presses Enter.

Group Box	A rectangular box used to group buttons together. You can also include a caption in the upper left corner of the group box.

Owner Draw	A button that allows the application to paint the button itself. When the button needs painting, it sends a WM_DRAWITEM message to its parent.

Push Button	A button containing text. The user clicks the button, which sends a BN_CLICKED message to the parent window.

Radio Button	A circular button that includes identifying text to the left or right. The circle is filled with a solid dot when it's been selected. It is the application's responsibility to fill or clear the dot when the users turns the button on or off.

Radio buttons must appear in groups. Usually, a group of radio buttons presents the user with a group of mutually exclusive options.

When a the user clicks a radio button, the button sends a BN_CLICKED message to the parent window.

User Button	Customized buttons for Windows 2.0 compatibility; we recommend that you don't use user button controls with Windows 3.0. Instead, you should use owner draw buttons.

Use the Control menu or one of following tools to add Button controls to your dialog box:

Check Box

Group Box

Push Button

Radio Button

Once you've placed a Button control in your dialog box, you can customize  it.


Customizing a button
Customizing a button control

With the Button Style dialog box, you can customize a button control. Double-click the button to display the Button Style dialog box.

Here's what you can do:

1.	Specify the caption you want displayed with the button in the Caption input box.

2.	Specify the type of caption with the Caption radio buttons. If you're adding text to your Button, you can turn on one of the Justification radio buttons.

3.	Enter a number or an alphanumeric expression for the control in the Control ID input box.

4.	Choose the button's attributes with the Attributes check boxes.

5.	Add a scroll bar to the button with the Scroll Bar check boxes.

6.	Choose the type of button you want with the Button Type radio buttons.

Choose OK when you're done.

See Also

Button controls


Combo box controls

A combo box is a combination of two different types of controls. A combo box combines a list box and a static control or an edit control.

Use the Control menu or the Combo Box tool to put a combo box control in your dialog box. Once you've placed your control, you can customize it.


Customizing a combo box
Customizing a combo box control

You can customize a combo box control with the Combo Box Style dialog box. Double-click the combo box in the dialog box, and the Combo Box Style dialog box appears.

Here's what you can do with the Combo Box Style dialog box:

1.	Specify the caption you want displayed with the static control in the Caption input box. Specify the type of caption with the Caption radio buttons.

2.	Enter a number or an alphanumeric expression for the control in the Control ID input box.

3.	Choose the attributes with the Attributes check boxes.

4.	Choose one or more of the Type radio buttons to further define the combo box.

5.	Choose one or more of the Owner Drawing radio buttons to indicate whether the list contained in the list box should be drawn by the list box itself or by the application.

When you're done, choose OK.

See Also

Combo Box controls


Custom controls

If you want to use a control that doesn't fit into one of the predefined Windows 3.0 types, you can create a custom control.

There are two types of custom controls: those that you can install and those that are application specific. Installable custom controls must be implemented using a dynamic link library. Custom controls specific to an application are implemented in the application itself. Resource Workshop draws them as either gray boxes or empty frames.

Use the Control menu or the Custom Control icon to put a custom control in your dialog box.

See Also

Adding a custom control

Displaying custom controls

Installing a custom control library


Adding a custom control
Adding a custom control to your dialog box

If you want to create your own custom controls, you'll need to design them and store them in dynamic link library (.DLL) files.

Once you've installed a DLL file containing custom controls, you can add any of those custom controls to your dialog boxes.

1.	Click the Custom Control icon in the Tools palette or choose Control|Custom. You'll see the New Custom Control dialog box.

2.	In the Class drop-down box, choose the custom control you want. If you've installed a Borland custom control library, you'll see the Borland custom controls.

3.	Click OK. The mouse cursor turns into a cross hair, indicating that it's ready to place the custom control.

4.	Click in the dialog box where you want to place the custom control.

See Also

Custom controls


Displaying custom controls

Before you add any custom controls to your dialog box, you may want to decide how they'll be displayed in the Dialog editor. Choose Options|Preferences to see if you've chosen to display your dialog boxes in Draft or Normal mode.

If so, you may also want to turn off the Draw Custom Controls as Frames radio button so that you'll see more than just a frame for your custom controls.

See Also

Custom Controls


Installing a custom control library

Custom controls are stored in dynamic link library (.DLL) files. If you want to add custom controls to your dialog box, you'll need to install the appropriate DLL file(s). Then the custom controls in that DLL will be available just like any standard Windows control.

To install a DLL file containing a custom control library,

1.	In the Dialog editor, choose Options|Install Control Library. You'll see the Install a Install a New Control Library dialog box.

2.	Specify the custom control DLL file in the File input box.

Choose OK. Now the controls contained in that DLL file are available for you to add to your dialog box.

Before you add them, however, you should decide how they'll be displayed.

See Also

Custom Controls


Edit text controls

An edit text control lets the user enter text from the keyboard; for example, when the user opens a file.

Use the Control menu or the Edit Text tool to place edit text controls to your dialog box. You can then customize the control.


Customizing edit text
Customizing edit text controls

Customize an edit text control by double-clicking it in the dialog box. The Edit Text Style dialog box appears.

Here's what you can do with the Edit Text Style dialog box:

1.	Specify the caption you want displayed with the edit text in the Caption input box. Specify the type of caption with the Caption radio buttons.

2.	Justify the text in an edit text control with the Justification radio buttons.

3.	Enter a number or an alphanumeric expression for the control in the Control ID input box.

4.	Choose the edit text attributes with the Attributes check boxes.

5.	Choose the orientation of any scroll bars you add to the edit text control with the Scroll Bar check boxes. You can add horizontal and vertical scroll bars if the edit text control allows more text than can fit in the control border.

6.	Choose how the user will type text with the Line radio buttons, (the first set of radio buttons on the left side of the dialog box).

7.	Choose how the text is displayed when it's typed with the Case radio buttons.

8.	Choose how the text is converted when its typed with the Text Conversion check boxes (the first set of check boxes).

9.	Choose how the edit text will scroll with the Automatic Scroll check boxes.

Choose OK when you're done.

See Also

Edit text controls


List box controls

A list box is a rectangle containing a list of text strings. Usually, a user can browse through what's displayed in a list box, then select one or more items. The list box sends a message to the parent window about the selected item(s).

If the list of items exceeds the length or width of the list box, you can add scroll bars to this list box.

Use the Control menu or the List Box tool to place list box controls in your dialog box. You can then customize your list box.


Customizing a list box
Customizing list box controls

Customize a list box control with the List Box Style dialog box. To display this dialog box, double-click the list box control in the dialog box.

Here's what you can do with the List Box Style dialog box:

1.	Specify the caption you want displayed with the list box in the Caption input box.

2.	Specify the type of caption with the Caption radio buttons.

3.	Enter a number or an alphanumeric expression for the control in the Control ID input box.

4.	Choose the list box's attributes with the Attributes check boxes.

5.	Choose the orientation of any scroll bars you add to the list box with the Scroll Bar check boxes. You can add scroll bars to a list box if the list of items exceeds the length or width of the list box.

6.	Choose whether the list in the list box should be drawn by the list box or the application with the Owner Drawing radio buttons.

7.	Choose one or more of the List Box check boxes to further define the list box.

Choose OK when you're done.

See Also

List box controls


Scroll Bar controls

A scroll bar is used to represent a range of values. A scroll bar is a rectangle with direction arrows at each end. Between the arrows, a square icon (sometimes called a thumb) indicates the current position in the scrollable window.

Use the Control menu or the Horizontal Scroll Bar or Vertical Scroll Bar tools to add horizontal and vertical scroll bar controls to your dialog box.

Once you've placed your scroll bar, you can customize it.


Customizing a scroll bar
Customizing scroll bar controls

You can customize your scroll bars with the Scroll Bar Style dialog box. To display it, double-click the scroll bar control you want to modify.

Here's what you can do with the Scroll Bar Style dialog box:

1.	Specify the caption you want displayed with the scroll bar in the Caption input box.

2.	Specify the type of caption with the Caption radio buttons.

3.	Enter a number or an alphanumeric expression for the control in the Control ID input box.

4.	Choose the scroll bar's attributes with the Attributes check boxes.

5.	Choose the scroll bar's orientation with the Scroll Bar radio buttons.

6.	Choose the scroll bar's alignment with the Alignment radio buttons.

Choose OK when you're done.

See Also

Scroll bar controls


Static controls

A static control displays text or art the user can't change. You can use static controls to label portions of your dialog box or to present information graphically.

Use the Control menu or one of following tools to add Static controls to your dialog box:

Black Frame Static Control

Black Rectangle

Iconic Static Control

Text Static Control

Once you've placed a static control, you can customize it.


Customizing static controls

You can customize static controls with the Static Style dialog box. Double-click the static control in the dialog box and the Static Style dialog box appears.

Here's what you can do with the Static Style dialog box:

1.	Specify the caption you want displayed with the static control in the Caption input box. Specify the type of caption with the Caption radio buttons.

2.	Enter a number or an alphanumeric expression for the control in the Control ID input box.

3.	Choose the static controls' attributes with the Attributes check boxes.

4.	Define what's displayed by the static control with Control Type radio buttons.

5.	Disable character underlining with the No Character Underline check box.

6.	If you're working with an icon, you can press the Edit Icon button to load the Paint editor and edit your icon.

Choose OK when you're done.

See Also

Static controls


Working with controls

Once you've defined a dialog box, you can create and manipulate its controls. In the Dialog editor, the Tools palette makes it easy to work with controls.

Here's what you can do with controls:

Add controls to your dialog box

Add multiple copies of a control

Align controls with a grid

Change a control's class

Edit controls

Edit groups of controls

Group related controls

Move and resize controls

Reorder controls

Specify which controls are tab stops


Adding controls
Adding controls to your dialog box

One way to add a new control to your dialog box is to click the control you want in the Tools palette. Your cursor changes to indicate the type of control you're placing. Click where you want to place the control in the dialog box.

You can also use the Control menu to add controls to your dialog box.

See Also

Working with controls


Adding multiple copies of a control

Once you place a control in your dialog box, you can place additional copies of the same control. Move to where you want to place another copy and click the right mouse button.

You can also place multiple, identical copies of a control in rows or columns with the Edit|Duplicate command or the Duplicate tool.

Here's how:

1.	Select the control you want to duplicate.

2.	Select the Edit|Duplicate command or the Duplicate tool. The Duplicate Control dialog box is displayed.

3.	Enter the number of rows and columns you want and the spacing between rows and columns.

4.	Click OK.

See Also

Working with controls


Aligning controls with a grid

You can use a grid to help align the controls in your dialog box. Display a grid in your dialog box window by choosing Align|Grid. You'll see the Set Grid Attributes dialog box where you specify the width and height of each cell in the grid and the grid type.

Once you specify the grid, use the mouse and the cursor keys to align the controls in the dialog box. First, place a sizing frame around the controls you want to align.

Then, use the mouse to position the sizing frame.

1.	Place the Pick tool inside the sizing frame.

2.	Press the left mouse button.

3.	Move the mouse.

If the grid is absolute, the sizing frame snaps to the grid's absolute position when you release the mouse. If the grid is relative, the sizing frame moves relative to the grid's previous position.

Once the sizing frame is in place, use the arrow keys to fine-tune its position. The arrow keys move the sizing frame in dialog units.

See Also

Working with controls


Changing a control's class

You can change the class of a control by holding down Ctrl and double-clicking the control. Or you can use Tab to select the control, then hold down Ctrl and press Enter.

You'll see the Generic Control Style dialog box, where you can specify a new class, caption, control ID, and style for the control.

See Also

Working with controls


Editing controls

Once you've added a control to your dialog box, you can easily modify it  by double-clicking it . A dialog box appears with options that can modify the look of your control.

Exactly which dialog box appears depends on the type of the control you choose to change.

Here's a list of the controls you can edit and the dialog box you'll be working with:

Controls	Dialog Box

Buttons	Button Style dialog box

Combo boxes	Combo Box Style dialog box

Custom controls	New Custom Control dialog box

Edit text	Edit Text Style dialog box

List boxes	List Box Style dialog box

Scroll bars	Scroll Bar Style dialog box

Static controls	Static Style dialog box

See Also

Working with controls


Grouping related controls

Use the Set Groups tool to define groups of controls. Users can move within groups using the arrow keys.

Here's how to group controls:

1.	Move the related controls so they're together.

2.	Click the Set Groups tool. Any controls that are the first member of the group are surrounded by a box.

3.	For each group you want to define, click the first member so it's surrounded by a box. You don't have to define the last member of a group. By clicking the first member of each group, you identify the last member of the previous group.

4.	When you finish identifying the first member in each group, choose the Pick tool to return to edit mode.

You can also use the Options|Set Groups command to group controls.

See Also

Working with controls


Moving and resizing controls

To move and resize a control, you first need to select it by clicking it. Then move the control by dragging it. Or, resize the control by moving the mouse cursor to the appropriate edge or corner (until it turns into a double arrow), and dragging the control.

If you want to use the keyboard to move and resize controls, press Tab to select the control. Then use the arrow keys to move what you've selected, and press Enter to confirm the move. Press Esc instead of Enter if you change your mind.

You can also specify the control's x and y coordinates.

See Also

Working with controls


Reordering controls

You can specify the order in which users access the controls in your dialog box. The order is especially important when you've defined groups of related controls.

You specify the order of controls with the Set Order tool. Here's how:

1.	Choose the controls whose order you want to change.

2.	Click the Set Order tool. Each control is ordered to show its current place in the overall order.

3.	Click the controls you want to assign new order numbers to. The control is assigned the next number.

4.	When you finish assigning new order numbers, choose the Pick tool to return to edit mode.

You can also use the Options|Set Order command to reorder controls.

See Also

Working with controls


Specifying a control's tab stops
Specifying which controls are tab stops

When you add a control to a dialog box, it's automatically defined as a tab stop. You can change this so that only some controls are tab stops, and users can use Tab to move only to the controls you want:

To change a tab stop with the Tab Set tool:

1.	Click the Tab Set tool. Each control that's currently a tab stop is surrounded by a box.

2.	To set a tab stop, click any control that's not surrounded by a box. To remove a tab stop, click a control that's already a tab stop.

3.	When you finish changing tab stops, choose the Pick tool to return to edit mode.

You can also use the Tab Stop in the control's Style dialog box to set tab stops. Another way to set tab stops is to use the Options|Set Tabs command.

See Also

Working with controls


Specifying x- and y-coordinates for your controls

Once you've added a control to your dialog box, you can specify exact x- and y-coordinates for that control. The x- and y-coordinates control not only positioning, but also the size of the control.

Here's how to specify x- and y-coordinates:

1.	Choose the control you want to specify coordinates for.

2.	Choose Align|Size or press Alt and double-click the mouse. The Size Controls dialog box appears where you can resize controls.

3.	Specify the x, cx, y, and cy coordinates in dialog units.


Editing groups of controls

Once you've added controls to your dialog box, you can use the Dialog editor to change groups of controls.

You can select multiple controls, align them, resize them, or place them in columns and rows.

See Also

Working with controls


Selecting multiple controls

Before you're ready to align and resize groups of controls, you need to know how to select more than one control at a time.

To select multiple controls,

1.	Click the Pick tool.

2.	Place the cursor where you want the sizing frame to start.

3.	Click the left mouse button and hold it down.

4.	Drag your mouse so that the sizing frame surrounds all the controls you want to select.

5.	Release the mouse button.

Make sure the sizing frame is wide enough and high enough to surround the outer edges of all selected controls.

See Also

Editing groups of controls


Aligning groups of controls
Aligning controls

It's easy to line up groups of controls with the Align menu. Here's how:

1.	Select the controls you want to align.

2.	Choose Align|Align Controls. You'll see the Align Controls dialog box where you align controls.

3.	When you choose the vertical and horizontal alignment you want, click OK.

Notice the accelerators listed in the Align Controls dialog box. Instead of using Align|Align Controls, you can select the group of controls and then use the Align Controls accelerators. You can undo the alignment by choosing Edit|Undo Align Group or by pressing Alt+Backspace. You may have to choose Undo more than once.

You can also use the Alignment palette to align controls.

See Also

Editing groups of controls


Resizing controls

To resize a control, you can select it and drag the appropriate edge or corner. The Dialog editor makes it easy to resize groups of controls with the Align menu. Here's how:

1.	Select the controls you want to align.

2.	Choose Align|Size. You'll see the Size Controls dialog box where you resize controls.

3.	After you choose the vertical and horizontal sizing options you want, click OK.

You can undo the sizing options by choosing Edit|Undo Size Group (or press Alt+Backspace). You may have to choose Undo more than once.

See Also

Editing groups of controls


Placing controls in columns and rows

If you want to arrange controls in an array of columns and rows, use the Align menu. Here's how:

1.	Select the controls you want to arrange in columns and rows.

2.	If necessary, expand the sizing frame so that the columns and rows you want will fit. You can drag an edge or a corner to resize the border.

3.	Choose the Align|Array command. You'll see the Form Controls Into An Array dialog box where you can put controls into columns and rows.

4.	After you've chosen the options for the array, click OK.

You can also use the Duplicate tool to place controls in columns and rows.

You can undo the formatting by choosing Edit|Undo Move Group (or press Alt+Backspace). You may have to choose Undo more than once.

See Also

Editing groups of controls


Testing a dialog box

Choose Options|Test Dialog or the Test tool to test your dialog box. You can press Tab and the arrow keys to see you how can move around in your dialog box, or you can type text to see how text is scrolled in an edit text control. Check to see if your controls are in the order you want them.

See Also

Dialog boxes


Saving a dialog box

It's a good idea to save your changes as you go along, rather than waiting for Resource Workshop to prompt you when you close the project.

There are two primary options you can use to save changes you've made to an dialog box. You can

•	Save the entire project

•	Save the dialog box in a resource script file

See Also

Dialog boxes


Saving a dialog box in a resource script file

You can store your dialog box resource in a dialog (.DLG ) file. A dialog file usually contains a resource script definition for one or more dialog boxes. If you add a dialog file to a project, Resource Workshop automatically adds an rcinclude statement in the Project window, which references your dialog file.

To store dialog boxes in a .DLG file, you'll need to add a dialog file to your project. Then you can choose to store dialog boxes in this dialog file as you create them.

Here's how the process works:

1.	Choose File|Add to Project. The Add File to Project dialog box appears.

2.	Choose DLG Resource Script in the Files Type drop-down box.

3.	Type a new name in the File Name input box.

4.	Choose OK. Click Yes when Resource Workshop asks you if you want to save the file.

You've created an empty dialog file. To create a new dialog box and add it to the DLG file,

1.	Choose Resource|New. The New Resource dialog box appears.

2.	Select the dialog script file you just created in the Place Resource In combo box

3.	In the Resource Type list box, double-clicked DIALOG.

4.	Click OK.

You'll see your new dialog box in the Dialog editor ready to customize with controls. When you finish customizing your dialog box and exit the Dialog editor, you'll see a DIALOG entry indented under the rcinclude for the .DLG file in the Project window.

See Also

Saving dialog boxes


Editing the resource script of a dialog box

In addition to creating and modifying dialog boxes directly with the Dialog editor, you can also work with the dialog box's resource script.

To work with the resource script for a dialog box, select the dialog box in the Project window by clicking it. Then choose Resource|Edit As Text. Resource Workshop brings up the source script for the resource in its internal text editor.

See Also

Dialog boxes


Window Style dialog box overview
Window Style dialog box

Use the Window Style dialog box to specify the details of your dialog box.

To open this dialog box,

-	select the dialog box and press Enter

-	double-click the dialog box's title bar or outer edge

Caption input box

The Caption input box is where you enter the caption of the dialog box.

Class input box

The Class input box is where you assign a custom class to your dialog box.

Dialog Style check boxes

The Dialog Style check boxes customize your dialog box.

Face input box

The Face input box is where you enter the font's face name.

Fonts button

The Fonts button chooses a font for the dialog box text.

Frame Style radio buttons

The Frame Style radio buttons choose your dialog box's frame style.

Menu input box

The Menu input box puts a menu in your dialog box.

Size input box

The Size input box is where you enter the font's size.

Window Type radio buttons

The Window Type radio buttons choose a type for your dialog box.


Caption input box (Window Style dialog box)
Caption input box

The Caption input box is where you enter the caption you want displayed on the dialog box. It's displayed in the top center of the dialog box.


Class input box

The Class input box is where you assign a custom class to your dialog box. A custom class designation lets your application process dialog box messages with your own windows procedures instead of using Windows procedures.

If you enter bordlg your dialog box is implemented as a Borland style dialog box, like the ones that are used in Resource Workshop. Use the Borland custom control tools to put Borland-style controls in your dialog box.


Menu input box

The Menu input box is where you put a menu in your dialog box. Just type the menu's resource identifier or resource ID.

The Dialog editor won't display the menu resource exactly as you've defined it. Instead, it displays a pop-up called "Menu" that includes a single menu item called "Item."


Window Type radio buttons

The Window Type radio buttons choose a type for your dialog box.

Child

Turn the Child radio button on if the dialog box is a child of the current window. It's unusual to define a dialog box as a child.

Iconic Pop-up

Turn the Iconic Pop-up radio button on to define your dialog box as a pop-up window that's originally displayed as an icon.

Overlapped

Turn the Overlapped radio button on to define your dialog box as an overlapped pop-up window that can be partially covered. Define a dialog box as overlapped only when it's the main window in the application.

Pop-up

Turn the Pop-up radio button on if your dialog box is a pop-up window. Because most dialog boxes are pop-ups, this is the default.


Frame Style radio buttons

The dialog box's frame style controls the dialog box frame and whether the dialog box displays a title bar at the top.

Border

Turn the Border radio button on if you want a single, thin border, without a title bar, for your dialog box.

Caption

The Caption radio button creates a single, thin border and a title bar where a caption can be displayed. This is the default.

Dialog Frame

Turn the Dialog Frame radio button on if you want a double border, without a title bar, for your dialog box.

No Border

If you don't want a border or a title bar on your dialog box, turn the No Border radio button on.


Dialog Style check boxes

The Dialog Style check boxes determine what the dialog box looks like and how the user can work with it.

Absolute Align check box

The Absolute Align check box makes the dialog box coordinates relative to the display screen.

Clip Children check box

The Clip Children check box protects the client area of the child window.

Clip Siblings check box

The Clip Siblings check box protects the siblings of this window.

Local Edit check box

The Local Edit check box allocates any edit text controls to the application's local heap.

Horizontal Scroll check box

The Horizontal Scroll check box inserts a horizontal scroll bar.

Maximize Box check box

The Maximize Box check box adds a Maximize button to your dialog box.

Modal Frame check box

The Modal Frame check box frames the window with a combination of the dialog frame and the caption styles.

Minimize Box check box

The Minimize Box check box adds a Minimize button to your dialog box.

No Idle Messages check box

The No Idle Messages check box suppresses sending idle messages.

System Menu check box

The System Menu check box inserts a system menu on the left side of the title bar.

System Modal check box

The System Modal check box makes the dialog box modal.

Thick Frame check box

The Thick Frame check box places a thick frame around the dialog box.

Vertical Scroll check box

The Vertical Scroll check box inserts a vertical scroll bar.

Visible check box

The Visible check box makes the dialog box visible.


System Menu check box

If you want a system menu box on the left side of the title bar, turn the System menu check box on. A System menu is also called a Control menu.

 The system menu appears only if you've also turned on the Caption radio button. If you've turned on the Child radio button, you'll get a close box instead of a Control menu.


Thick Frame check box

If you want a thick frame around the dialog box when it's displayed in your application, turn on the Thick Frame check box. Use this option if you want the dialog box to be resizeable.

(Don't confuse this option with the Thick Frame radio button in the Options|Preferences dialog box. That option defines what the dialog box will look like when you select it in the Dialog editor.)


Vertical Scroll check box

If you want a vertical scroll bar in your dialog box frame, turn the Vertical Scroll check box on.


Horizontal Scroll check box

If you want a horizontal scroll bar in your dialog box frame, turn the Horizontal Scroll check box on.


Minimize Box check box

To add a minimize box to the right side of the title bar, turn the Minimize Box check box on. The minimize box appears only if you've also turned on the Caption radio button.


Maximize Box check box

To add a maximize box to the right side of the title bar, turn the Maximize Box check box on. The maximize box appears only if you've also turned on the Caption radio button.


Absolute Align check box

Turn the Absolute Align check box on if you want to make the dialog box coordinates relative to the display screen rather than the parent window.


System Modal check box

Turn on the System Modal check box if you want to make the dialog box modal. This means that the user can't switch to do anything else until the dialog box is put away.


Local Edit check box

If you've allocated any edit text controls in the dialog box to the application's local heap, turn the Local Edit check box on.

You'll want to turn this check box on if your application uses the EM_SETHANDLE and EM_GETHANDLE messages.


Modal Frame check box

If you want users to be able to move the dialog box, turn the Modal Frame check box on. This option frames the window with a combination of the dialog frame and caption styles.


No Idle Messages check box

If you want to suppress sending WM_ENTERIDLE messages to the application's main window, turn the No Idle Messages check box on. For this option to have any effect, you must also turn on the System Modal check box.


Clip Children check box

Turn the Clip Children check box on to protect child windows from being drawn on by the dialog box window.


Clip Siblings check box

Turn the Clip Siblings check box on to protect the siblings of this window. Drawing is restricted to this window. This option is not required for pop-up windows.


Face input box

The Face Name input box is where you enter the typeface for the text in your dialog box.


Size input box

The Size input box is where you enter the font's point size.


Visible check box

The Visible check box makes the dialog box visible. This is the default setting. When you turn this check box off, the WS_VISIBLE style is changed to NOT WS_VISIBLE.


Fonts button

Press the Fonts button to display the Select Font dialog box, where you choose the font for the text in your dialog box.


Select Font dialog box overview
Select Font dialog box

The Select Font dialog box is where you choose the font, size, and font style for the text in your resource. Your choice is displayed at the bottom of the dialog box.

Face Name drop-down box

The Face Name drop-down box chooses the typeface.

Size input box

The Size input box is where you choose the font size.

Style check boxes

The Style check boxes select the font style.


Face Name drop-down box

The Face Name drop-down box is where you choose the typeface for the text in your resource.


Size input box

Enter the font's point size in the Size input box.


Style check boxes

The style check boxes choose the font's style. You can bold or italicize the font, underline it, or strike it out.


Bold check box

Turn on the Bold check box to bold the font. Look at the bottom of the Select Font dialog box to see what the bolded font looks like.


Italic check box

Turn on the Italic check box to italicize the font. Look at the bottom of the Select Font dialog box to see what the italicized font looks like.


Underline check box

Turn on the Underline check box to underline the font. Look at the bottom of the Select Font dialog box to see what the underlined font looks like.


Strikeout check box

Turn on the Strikeout check box to strike out the font. Look at the bottom of the Select Font dialog box to see what the font looks like.


Caption input box

Type the caption you want displayed with the control in the Caption input box. The type of control determines where the caption displays. For example, in a group box, the caption displays at the top left. In a push button, the caption displays inside the button.

Not all controls display a caption. For example, a list box does not display the text specified in its caption.

For an icon static control, the Caption input box can contain the name or the numeric ID of the icon resource. If the icon resource has a name, enter the name and turn on the Text radio button next to the input box. If the icon resource has no name, enter the number and turn on the Number radio button. (If you enter an identifier, turn on the Number radio button because an identifier evaluates to a number.)

You can also enter a caption with the Caption window.

Once you've entered a caption, turn on one of the Caption radio buttons. (These don't apply to Borland custom controls.)


Caption radio buttons

The Caption radio buttons choose how the caption is displayed.

Number

If you don't want the caption to be surrounded by quotes, turn on the Number radio button.

Text

If you've entered a name in the Caption input box, turn on the Text radio button. This surrounds the caption with quotes in the .RC or dialog file source code.


Control ID input box

Enter the control's identifier in the Control ID input box. Control IDs can be a short integer or an integer expression.

If you enter an alphanumeric identifier, Resource Workshop checks to see if a #define or a constant declaration has already been created for that identifier. If not, Resource Workshop asks if you want to create an identifier.


Attributes check boxes

The Attributes check boxes select the control's attributes. Not all attributes apply to all controls.

Auto Horizontal check box

The Auto Horizontal check box automatically scrolls text to the left when it exceeds the width of the control.

Border check box

The Border check box draws a border around the control.

Disabled check box

The Disabled check box disables the control.

Group check box

The Group check box identifies the first control in a group.

Integral Height check box

The Integral Height check box sizes the list box at runtime.

OEM Conversion check box

The OEM Conversion check box converts text as it's typed in the control.

Sorted check box

The Sorted check box automatically sorts items in a list box in alphabetical order.

Tab Stop check box

The Tab Stop check box lets the user press Tab to access this control.

Vertical Scroll check box

The Vertical Scroll check box puts a vertical scroll bar in the list box.

Vertical Scroll Always check box

The Vertical Scroll Always check box always puts a vertical scroll bar in the list box, but disables it in specific situations. This check box is displayed only if you're running under Windows 3.1.

Visible check box

The Visible check box makes the image visible.


Tab Stop check box

Turn the Tab Stop check box on if you want the user to be able to press Tab to access this control. This attribute applies to all controls.


Disabled check box

Turn the Disabled check box on to disable the control by graying it. This prevents the control from responding to user input. This attribute applies to all controls.


Group check box

Turn the Group check box on to indicate the first control within a group. The user can then press the arrow keys to access all controls in the group. This attribute applies to all controls.


Border check box

Turn the Border check box on to draw a border around the control. This attribute applies only to list boxes, edit text, and static controls.


Vertical Scroll check box (Attributes)
Vertical Scroll check box

Turn the Vertical Scroll check box on to put a vertical scroll bar in the list box. This attribute applies only to combo box controls.


Vertical Scroll Always check box

Turn the Vertical Scroll Always check box on to always place a vertical scroll bar in the list box. The scroll bar is disabled when the list box doesn't contain enough items to scroll. This attribute applies only to combo box controls.

This check box is displayed only if you're running Resource Workshop under Windows 3.1.


Visible check box

Turn the Visible check box on to make the shade image visible. It is on by default.

When you turn this option off, the WS_VISIBLE style is changed to NOT WS_VISIBLE.


Sorted check box

Turn the Sorted check box on to automatically sort items in a list box in alphabetical order. This attribute applies only to combo box controls.


Integral Height check box (Attributes)
Integral Height check box

Turn the Integral Height check box on to size the list box at runtime so all items in the list are completely displayed (the default). If you need to precisely control the height of the list box, turn this option off. This attribute applies only to combo box controls.


OEM Conversion check box

Turn the OEM Conversion check box on to convert text as it's typed in the control to the current OEM character set. The text then gets reconverted to ANSI. This attribute applies only to combo box controls.


Auto Horizontal check box

Turn on the Auto Horizontal check box to scroll text automatically to the left when it exceeds the width of the control.

This attribute applies only to combo box controls.


Justification radio buttons

The Justification radio buttons justify text for radio buttons, check box buttons, and edit text.

Center

Turn the Center radio button on to center text. This option applies only to edit text controls.

Left

Turn the Left radio button on to justify text to the left. This is the default.

Right

Turn the Right radio button on to justify text to the right.


Scroll Bar check boxes

The Scroll Bar check boxes place scroll bars in your controls. This attribute applies to edit text and list boxes. Buttons can include scroll bars, although they are more commonly found elsewhere in a dialog box.

Horizontal check box

The Horizontal check box places a horizontal scroll bar.

Vertical check box

The Vertical check box places a vertical scroll bar.


Horizontal check box
Horizontal check box (Scroll Bar check boxes)

Turn on the Horizontal check box to place the scroll bar horizontally in the control.


Vertical check box
Vertical check box (Scroll Bar check boxes)

Turn on the Vertical check box to place the scroll bar vertically in the control.


Button Style dialog box overview
Button Style dialog box

The Button Style dialog box is where you define button controls. To display it, double-click the button control you want to modify.

Attributes check boxes

The Attributes check boxes select the control's attributes.

Button Type radio buttons

The Button Type radio buttons define the type of buttons to include in your dialog box.

Caption input box

The Caption input box is where you enter the caption you want displayed with the control.

Caption radio buttons

The Caption radio buttons choose how the caption is displayed.

Control ID input box

The Control ID input box is where you enter the control's identifier.

Justification radio buttons

The Justification radio buttons justify text.

Scroll Bar check boxes

The Scroll Bar check boxes put scroll bars in your buttons.


Button Type radio buttons

The Button Type radio buttons define the type of buttons to include in your dialog box.

Auto Check Box

Turn the Auto Check Box radio button on to define a check box that's identical to a regular check box. The box changes state only when the user clicks the mouse and holds the mouse button down. The text is highlighted when the box is selected.

Auto Radio Button

Turn the Auto Radio Button radio button on to define a button that's identical to a radio button. The button changes state only when the user clicks the mouse and holds the mouse button down.

Auto Three State

Turn the Auto Three State radio button or to define a button that's identical to a Three State button. The button changes state only when the user clicks the mouse and holds the mouse button down.

Check Box

Turn the Check Box radio button on to define a small, rectangular button, which can include text to the left or right of the button. The box is marked with an X when it's selected. This is the default setting.

Default Push Button

Turn the Default Push Button radio button to define a button containing text. It's identical to a push button, but also includes a bold border indicating that it's the default response if the user presses Enter.

Group Box

Turn the Group Box radio button on to define a box that groups buttons. You can also include a caption in the upper left corner of the group box.

Owner Draw

Turn the Owner Draw radio button on to define a radio button that's an owner-draw button. See your Windows documentation for information about implementing customized buttons.

Push Button

Turn the Push Button radio button to define a button containing text. This is the default setting.

Radio Button

Turn on the Radio Button radio button to define a small, circular button, which can include text to the left or right of the button. When it's selected, the circle is filled with a solid dot and all other mutually exclusive choices are turned off. This is the default setting.

Three State

Turn the Three State radio button on to define a button that's identical to a check box. In addition to being on or off, the button has a third state - it can be grayed to show that its state is unknown or indeterminate.

User Button

Turn the User Button radio button on to customize buttons for Windows 2.0 compatibility. Try to avoid using user button controls with Windows 3.0. Instead, you should use owner draw buttons.


Scroll Bar Style dialog box overview
Scroll Bar Style dialog box

The Scroll Bar Style dialog box is where you define scroll bar controls. To display it, double-click the scroll bar control you want to modify.

Alignment radio buttons

The Alignment radio buttons align your scroll bar.

Attributes check boxes

The Attributes check boxes select the control's attributes.

Caption input box

The caption input box is where you enter the caption you want displayed with the control.

Caption radio buttons

The Caption radio buttons choose how the caption is displayed.

Control ID input box

The Control ID input box is where you enter the control's identifier.

Scroll Bar radio buttons

The Scroll Bar radio buttons determine the orientation of your scroll bars.


Scroll Bar radio buttons

The Scroll Bar radio buttons determine the orientation of your scroll bars. Scroll bars can be placed horizontally or vertically.

Horizontal

Turn on the Horizontal radio button to place the scroll bar horizontally.

Vertical

Turn on the Vertical radio button to place the scroll bar vertically.


Alignment radio buttons

The Alignment radio buttons align your scroll bar. A rectangle defines the boundaries of the scroll bar. You can resize the rectangle, then use these alignment options to decide how the scroll bar is aligned within the rectangle:

Bottom Right

Turn the Bottom Right radio button on to display the scroll bar in the bottom right corner of the rectangle.

None

Turn the None radio button on if you want the scroll bar to fill the entire rectangle. This option is the default.

Top Left

Turn the Top Left radio button on to display the scroll bar in the upper left corner of the rectangle.


List Box Style dialog box overview
List Box Style dialog box

The List Box Style dialog box is where you define list box controls. To display it, double-click the list box control you want to modify.

Attributes check boxes

The Attributes check boxes select the control's attributes.

Caption input box

The caption input box is where you enter the caption you want displayed with the control.

Caption radio buttons

The Caption radio buttons choose how the caption is displayed.

Control ID input box

The Control ID input box is where you enter the control's identifier.

Has Strings check box

The Has Strings check box stores text for each item in the list box.

List Box check boxes

The List Box check boxes define the list box. You can turn one or more of these check boxes on.

Owner Drawing radio buttons

The Owner Drawing options determine whether the list contained in the control should be drawn by the control or the application.

Scroll Bar check boxes

The Scroll Bar check boxes put scroll bars in your control.


Has Strings check box

Turn on the Has Strings check box to cause the list box to store text for each list item with the LB_INSERTSTRING or LB_ADDSTRING message. The list box can also retrieve list items from the message LB_GETTEXT.


Owner Drawing radio buttons

The Owner Drawing options determine whether the list contained in the control should be drawn by the list box or the application.

Fixed

Turn the Fixed radio button on if you want the application to draw the list or combo box in response to WM_DRAWITEM messages. The application can also respond to WM_COMPAREITEM, WM_DELETEITEM, and WM_MEASUREITEM messages.

The list or combo box control sends the WM_MEASUREITEM message to the application only when the list box is initially drawn, which fixes the list box item height.

Has Strings

This option applies only to combo boxes. Turn on Has Strings if you've turned on either the Fixed or Variable radio buttons and you want the combo box to store text for each list item with the LB_INSERTSTRING or LB_ADDSTRING message. The combo box can also retrieve list items from the message LB_GETTEXT.

Not Owner Draw (list box controls)/No (combo box controls)

Turn the Not Owner Draw or No radio button on if you want the list or combo box control to draw the list. This is the default.

Variable

Turn the Variable radio button on if you want the application to draw the list or combo box in response to WM_DRAWITEM messages. The application can also respond to WM_COMPAREITEM, WM_DELETEITEM, and WM_MEASUREITEM messages.

The list or combo box control sends the WM_MEASUREITEM message to the application for each item in the list or combo box. Each item can vary in height.


List Box check boxes

The List Box check boxes define the list box. You can turn one or more of these check boxes on.

Don't Redraw check box

The Don't Redraw check box prevents the list box from being redrawn.

Extend Select check box

The Extend Select check box lets the user select more than one item in the list.

Integral Height check box

The Integral Height check box resizes the list box height at runtime.

Multi Column check box

The Multi Column check box lets the user horizontally scroll the list box.

Multiple Select check box

The Multiple Select check box lets the user select more than one item at a time.

Notify check box

The Notify check box notifies the parent window when the user clicks on an item in the list.

Pass Keyboard Input check box

The Pass Keyboard Input check box passes what the user types to the application.

Scroll Bar Always check box

The Scroll Bar Always check box always puts a vertical scroll bar in the list box, but disables it in specific situations. This check box is displayed only if you're running under Windows 3.1.

Sort check box

The Sort check box sorts the list.

Tab Stops check box

The Tab Stops check box organizes the information in the list box in columns.


Notify check box

Turn the Notify check box on to send an input message to the parent window when the user clicks on an item in the list. This is the default.


Sort check box

Turn the Sort check box on to sort the list items alphabetically.


Multiple Select check box

Turn on the Multiple Select check box to let the user select more than one item at a time. The user can also toggle on and off individual items.


Don't Redraw check box

Turn the Don't Redraw check box on to prevent  the list box from being redrawn when it's changed.


Tab Stops check box

Turn the Tab Stops check box on to organize the information in the list box in columns. The default column width is 32 dialog units or 8 characters. You should use Tab characters (\x09) to format the text.

(If you want to change the column width, the application should set its own tab stops using the LB_SETTABSTOPS message.)


Integral Height check box

Turn the Integral Height check box on to cause the list box to resize its height at runtime so that the client area is large enough to display items completely. This is the default.

If the Integral Height check box is turned on and the list box needs to be resized to show items completely, the list box always decreases its size. For example, if three items are completely displayed at runtime but another item doesn't quite fit, the list box will decrease its size so that only the three items are displayed.

If you turn off the Integral Height check box, your application must set the height of the list box to account for any items listed in it.


Multi Column check box

Turn the Multi Column check box to let the user horizontally scroll the list box to work with multiple columns.

If you turn on this check box, the application must send the LB_SETCOLWIDTH message to set the width of all columns in pixels.


Pass Keyboard Input check box

Turn the Pass Keyboard Input check box on to pass what the user types to the application.


Extend Select check box

Turn on the Extend Select check box to let the user select more than one item in the list.


Scroll Bar Always check box

Turn the Scroll Bar Always check box on to always place a vertical scroll bar in the list box. The scroll bar is disabled when the list box doesn't contain enough items to scroll.

This check box is displayed only if you're running Resource Workshop under Windows 3.1.


Combo Box Style dialog box overview
Combo Box Style dialog box

The Combo Box Style dialog box is where you define combo box controls. To display it, double-click the combo box control you want to modify.

Attributes check boxes

The Attributes check boxes select the control's attributes.

Caption input box

The Caption input box is where you enter the caption you want displayed with the control.

Caption radio buttons

The Caption radio buttons choose how the caption is displayed.

Control ID input box

The Control ID input box is where you enter the control's identifier.

Owner Drawing radio buttons

The Owner Drawing options determine whether the list contained in the control should be drawn by the control or the application.

Type radio buttons

The Type radio buttons choose the type of combo box you're creating.


Type radio buttons

The Type radio buttons choose the type of combo box you're creating.

Drop Down

Turn on the Drop Down radio button if you want the combo box to consist of a single line of editable text when the dialog box is first displayed.The user can click the down arrow to expand the list, and edit all items in the list.

Drop Down List

Turn on the Drop Down List radio button if you want the combo box to work just like a drop down combo box, but contain a static list instead of an editable list. The user can select an item in the list, but can't change anything.

Simple

Turn on the Simple radio button if you want the drop-down list to always expand to display items in the list. The user can edit the items in the list. This is the default.


Edit Text Style dialog box overview
Edit Text Style dialog box

The Edit Text Style dialog box is where you define edit text controls. To display it, double-click the edit text control you want to modify.

Attributes check boxes

The Attributes check boxes select the control's attributes.

Automatic Scroll check boxes

The Automatic Scroll check boxes choose how edit text will scroll.

Caption input box

The Caption input box is where you enter the caption you want displayed with the control.

Caption radio buttons

The Caption radio buttons choose how the caption is displayed.

Case radio buttons

The Case radio buttons determine how edit text is displayed when it's typed.

Control ID input box

The Control ID input box is where you enter the control's identifier.

Justification radio buttons

The Justification radio buttons justify text.

Line radio buttons

The Line radio buttons choose how the user will type edit text.

Scroll Bar check boxes

The Scroll Bar check boxes put scroll bars in your control.

Text Conversion check boxes

The Text Conversion check boxes choose how text is converted when it's typed.

Windows 3.1 check boxes

The Windows 3.1 check boxes assign attributes specific to 3.1.


Line radio buttons

The Line radio buttons choose how the user will type edit text.

Multiple Line

Turn on the Multiple Line radio button to let the user type text on multiple lines. (You'll probably want to choose how the text will be scrolled with the Automatic Scroll check boxes.)

Single Line

Turn on the Single Line radio button to restrict the text the user types to a single line. This is the default.


Case radio buttons

Use the Case radio buttons to choose how text is displayed when it's typed.

Case Insensitive

Turn the Case Insensitive radio button on to display text exactly as typed. This is the default.

Lower Case

Turn the Lower Case radio button on to display text in lowercase letters, regardless of how it's typed.

Upper Case

Turn the Upper Case radio button on to  display text in uppercase letters, regardless of how it's typed.


Text Conversion check boxes

Use the Text Conversion check boxes to choose how text is converted when it's typed.

Convert OEM check box

The Convert OEM check box converts the typed text to the current OEM character set.

Keep Selection check box

The Keep Selection check box highlights the selected text.

Password check box

The Password check box suppresses the display of each letter as its typed.


Password check box

Turn the Password check box on to suppress the display of each letter as it's typed. Instead, an asterisk appears in its place. This is helpful for keeping passwords secret.


Convert OEM check box

Turn the Convert OEM check box on to convert  text typed into the control to the current OEM character set. The text is then reconverted to ANSI.


Keep Selection check box

Turn Keep Selection check box on to highlight the selected text, even when the control doesn't have the keyboard focus. Choose Keep Selection when you want the user to see the highlighted text even when working with other controls.


Windows 3.1 check boxes

The Windows 3.1 check boxes assign attributes specific to 3.1.

Read Only check box

Turn the Read Only check box to make the text read only.

Want Return check box

Turn the Want Return check box on to pass the Enter key into the edit buffer.


Read Only check box

The Read Only check box makes the edit text read only. The user can't enter or modify text.


Want Return check box

The Want Return check box passes the Enter key into the edit buffer and does not perform the action for the default key. This attribute applies to multiline text only.


Automatic Scroll check boxes

Choose how edit text will scroll with the Automatic Scroll check boxes.

Horizontal check box

The Horizontal check box scrolls edit text horizontally.

Vertical check box

The Vertical check box scrolls edit text vertically.


Horizontal check box (Automatic Scroll)
Horizontal check box (Automatic Scroll check boxes)

Turn the Horizontal check box on to scroll edit text horizontally. This causes the text to automatically scroll ten characters to the right when the user types a character at the right edge of the edit text boundary. When the user presses Enter, the text scrolls back to the zero position.


Vertical check box (Automatic Scroll)
Vertical check box (Automatic Scroll check boxes)

Turn the Vertical check box on to scroll edit text vertically. This causes the text to scroll up a full page when the user presses Enter on the last line of the edit text control.

For this option to have any effect, you must also turn the Multiple Line radio button on.


Static Style dialog box overview
Static Style dialog box

The Static Style dialog box is where you define static controls. To display it, double-click the static control you want to modify.

Attributes check boxes

The Attributes check boxes select the control's attributes.

Caption input box

Enter the caption you want displayed with the control in the Caption input box.

Caption radio buttons

The Caption radio buttons choose how the caption is displayed.

Control ID input box

The Control ID input box is where you enter the control's identifier.

Control Type radio buttons

The Control Type radio buttons define what's displayed by the static control.

Edit Icon button

The Edit Icon Button is where you edit your icon.

No Character Underline check box

The No Character Underline check box turns off character underlining.


Control Type radio buttons

Use the Control Type radio buttons to define what's displayed by the static control.

Black Frame

Turn on the Black Frame radio button to display an empty frame that's the same color as the current window frame color. The default Windows color for window frames is black.

Black Rectangle

Turn on the Black Rectangle radio button to display a filled-in rectangle that's the same color as the current window frame color. The default Windows color for window frames is black

Centered Text

Turn on the Centered Text radio button to display text centered within the control border. If there are multiple lines of text, words that extend beyond the line wrap to the next line.

Gray Frame

Turn on the Gray Frame radio button to display an empty frame that's the color of the current screen background (desktop). The default Windows color for the desktop is gray.

Gray Rectangle

Turn on the Gray Rectangle radio button to display a filled-in rectangle that's the color of the current screen background (desktop). The default Windows color for the desktop is gray.

Icon

Turn on the Icon radio button to display an icon. Use the Edit Icon button to edit the icon.

Left Text

Turn on the Left Text radio button to display text flush left within the control border. This is the default. If there are multiple lines of text, words that extend beyond the line wrap to the next line.

Left Text No Wrap

Turn on the Left Text No Wrap radio button to display text flush left within the control border. If there are multiple lines of text, this option automatically disables word wrapping. You must end lines with a carriage-return character.

Right Text

Turn on the Right Text radio button to display text flush right within the control border. If there are multiple lines of text, words that extend beyond the line wrap to the next line.

Simple Text

Turn on the Simple Text radio button to display a single line of flush-left text.

White Frame

Turn on the White Frame radio button to display an empty frame. The rectangle frame is filled with the current window background color, and is therefore, invisible.

White Rectangle

Turn on the White Rectangle radio button to display a filled-in rectangle.The rectangle is filled with the current window background color, and is therefore, invisible. The default Windows color for the window background is white.


No Character Underline check box

The No Character Underline check box turns off character underlining. If your static control contains text, you can underline a character by preceding it with an ampersand (&).

Turn on the No Character Underline check box if you want to disable underlining. Turn it off when you want underlining enabled.


Edit Icon button

The Edit Icon Button starts the Paint editor where you edit your icon.

This button is enabled after you enter a caption for the icon.


New Custom Control dialog box overview
New Custom Control dialog box

The New Custom Control dialog box is where you add a new custom control to your dialog box. Make sure the control is already defined in a custom control library and that you've installed the library with Options|Install Control Library.

The only component of this dialog box is the Class drop-down box.


Class drop-down box

Choose the custom control you want in the Class drop-down box. Resource Workshop displays a sample of the custom control you've selected in the middle of the dialog box.

If you've installed the Borland custom control library, you'll see the Borland custom controls.


Generic Control Style dialog box overview
Generic Control Style dialog box

The Generic Control Style dialog box is where you change a control's class. Here are the components of the dialog box:

Caption input box

The Caption input box is where you enter the caption you want displayed with the control.

Caption radio buttons

The Caption radio buttons choose how the caption is displayed.

Control ID input box

The Control ID input box is where enter the control's identifier.

Class input box

The Class input box is where you assign a custom class to your dialog box.

Info input box

The Info input box is where you enter data that's passed to the WM_CREATE message.

Style input box

The Style input box is where you enter the control's new style.


Style input box

Enter the control's new style in the Style input box.

Here are the styles you can choose from:

Control Window Style Constants

Dialog Window Style Constants

Window Style Constants


Info input box

The Info input box holds up to 255 bytes of data that can be passed to the WM_CREATE message.

This data is meaningful within Resource Workshop only; if you enter data here, your dialog box won't be compatible with the Microsoft Resource Compiler.


Borland custom controls overview
Borland custom controls

Borland style controls are displayed in the Class drop-down box of the New Custom Control dialog box.

Control	Description

Auto Checkbox	A check box that's identical to a Borland-style check box. When the box is turned on, a check mark is put in the box. This is the default setting.

Auto Radiobutton	A radio button that's identical to a Borland-style radio button. When the button is turned on, it's filled with a smaller, solid diamond and all other mutually exclusive radio buttons are turned off. This is the default setting.

Bitmap	A bitmap.

Checkbox	A Borland-style check box. The check box can include text to the left or right of the button. The box changes state only when the user clicks the mouse and holds the mouse button down.

Default Pushbutton	A push button that's identical to a Borland-style push button, but includes a bold border indicating that it's the default response if the user presses Enter.

Group Shade	A concave gray box.

Horizontal Bump	A convex horizontal line.

Horizontal Dip	A concave horizontal line.

Pushbutton	A Borland-style push button. The button can contain text.

Radiobutton	A Borland-style diamond button that can include text to the left or right of the button. The button changes state only when the user clicks the mouse and holds the mouse button down.

Vertical Bump	A convex vertical line.

Vertical Dip	A concave vertical line.

See Also

New Custom Control dialog box


Borland custom control tools overview
Borland custom control tools

The Borland custom control tools are displayed on the right side of the Tools palette.

Bitmap

Button

Check box

Group shade

Horizontal line

Radio button

Vertical line

Use these tools to put Borland custom controls in your dialog box.

See Also

Tools palette


Bitmap custom control tool

The Bitmap custom control tool puts a "non-pushable" bitmap in your dialog box. Use it for displaying "splash" images.

Once you've placed the Bitmap control, double-click it to bring up the Borland Button Style dialog box.


Button custom control tool

The Button custom control tool puts a Borland-style push button in your dialog box. The button looks 3-dimensional.

Once you've placed the Push Button control, double-click it to bring up the Borland Button Style dialog box.


Check Box custom control tool

The Check Box custom control tool puts a Borland-style check box in your dialog box. The check box uses a check mark, rather than an X, to show its state. The box looks 3-dimensional.

Once you've placed the Check Box control, double-click it to bring up the Borland Check Box Style dialog box.


Group Shade custom control tool

The Group Shade custom control tool puts a Borland-style box in your dialog box. The box is gray-shaded and concave.

Once you've placed the Group Shade control, double-click it to bring up the Borland Shade Style dialog box.


Horizontal Dip custom control tool

The Horizontal Dip custom control tool puts a Borland-style horizontal line in your dialog box. The line is concave.

Once you've placed the Horizontal Dip control, double-click it to bring up the Borland Shade Style dialog box.


Radio Button custom control tool

The Radio Button custom control tool puts a Borland-style radio button in your dialog box. The radio button is diamond-shaped. The diamond is filled with a smaller, solid diamond when it's turned on.

Once you've placed the Radio Button control, double-click it to bring up the Borland Radio Button Style dialog box.


Vertical Dip custom control tool

The Vertical Dip custom control tool puts a Borland-style vertical line in your dialog box. The line is concave.

Once you've placed the Vertical Dip control, double-click it to bring up the Borland Shade Style dialog box.


Borland Button Style dialog box overview
Borland Button Style dialog box

The Borland Button Style dialog box is where you define a Borland style button or bitmap. To bring up the dialog box, place the control in your dialog box and double-click it.

Caption input box

The Caption input box is where you enter the caption you want displayed with the control.

Control ID input box

The Control ID input box is where you enter the control's identifier number.

Attributes check boxes

The Attributes check boxes select the control's attributes.

Button Type radio buttons

The Button Type radio buttons define the button type.


Attributes check boxes

The Attributes check boxes select the control's attributes.

Tab Stop check box

The Tab Stop check box defines how the user accesses the control.

Disabled check box

The Disabled check box disables the control.

Group check box

The Group check box identifies the first control in a group.

Visible check box

The Visible check box makes the image visible.

Border check box

The Border check box draws a border around the control.

Parent Notify check box

The Parent Notify check box sends messages to the parent window.

Owner Draw check box

The Owner Draw check box creates a customized button.


Tab Stop check box

Turn the Tab Stop check box on if you want the user to press Tab to access this control.


Disabled check box

Turn the Disabled check box on to disable the control. The disabled control is gray. This prevents the control from responding to user input.


Group check box (Borland style)
Group check box

Turn the Group check box on to indicate the first control within a group. The user can then press the arrow keys to access all controls in the group.


Border check box

Turn the Border check box on to draw a border around the control. The border is a dark line.


Parent Notify check box

Turn the Parent Notify check box on to cause the button to generate additional notification messages at runtime.

Message	Description

BBN_SETFOCUS 	The button sends this message to its parent window when it gains the keyboard focus through an action other than a mouse click.

BBN_SETFOCUSMOUSE 	The button sends this message to its parent window when it gains the keyboard focus through a mouse click.

BBN_GOTATAB	The button sends the notification to its parent window when the user presses the tab key while the keyboard focus is the button. The parent window can then intervene in the processing of the keystroke. If the parent intervenes, it returns a non-zero value.

BBN_GOTABTAB	The button sends the notification to its parent window when the user presses Shift-Tab (back-tab) while the keyboard focus is the button. The parent window can then intervene in the processing of the keystroke. If the parent intervenes, it returns a non-zero value.


Owner Draw check box

Turn the Owner Draw check box on to create an owner-draw button. When a visual aspect of the button changes, a WM_DRAWITEM message is sent to the owner with a far pointer to a DRAWITEMSTRUCT in the lParam of the message.

Refer to your Windows documentation for a description of the fields in the message. Note this enhancement:

-	For Windows owner-draw buttons, the itemID field of the DRAWITEMSTRUCT structure is unused. Borland buttons use this field to pass their type. If the button is a Default push button, this field will contain the value BS_DEFPUSHBUTTON. Otherwise, it will contain BS_PUSHBUTTON.


Visible check box

Turn the Visible check box on to make the shade image visible. It is on by default.

When you turn this option off, the WS_VISIBLE style is changed to NOT WS_VISIBLE.


Button Type radio buttons (Borland buttons)
Button Type radio buttons

The Button Type radio buttons define the type of push button.

Pushbutton

Turn the Pushbutton radio button on to define a Borland-style push button, which is a raised, 3-dimensional button. The button can contain text. When the user clicks the button, a BN_CLICKED message is sent to the parent window. This is the default setting.

Defpushbutton

Turn the Defpushbutton radio button on to define a button identical to a push button that also includes a bold border. The border indicates that it's the default response when the user presses Enter.

Bitmap

Turn the Bitmap radio button on to define a "non-pushable" bitmap. You'd use this option to place a "splash" screen in your dialog box.

To activate this feature, use the Resource|Rename command to assign a numeric resource name to the bitmap. The resource number is control ID assigned to the bitmap in the dialog box plus an offset. The offset value used depends on the type of display:

Offset	Display type

1000	Normal VGA-resolution

3000	Pressed VGA-resolution

5000	Focused VGA-resolution

2000	Normal  EGA-resolution

4000	Pressed EGA-resolution

6000	Focused EGA-resolution

For example, if the bitmap's control ID in the dialog box is 101, the bitmap's resource name would be 1101 to display in normal VGA-resolution. If the display is normal EGA-resolution, the bitmap's resource name would be 2101.

Once the bitmap resource name equals the control ID plus the correct offset, the image displays in the dialog box. To edit the bitmap, press the Edit button in the Borland Button Style dialog box.


Borland Check Box Style dialog box overview
Borland Check Box Style dialog box

The Borland Check Box Style dialog box is where you define a Borland-style check box. To bring up the dialog box, place the check box control in your dialog box and double-click it.

Caption input box

The Caption input box is where you enter the caption you want displayed with the control.

Control ID input box

The Control ID input box is where you enter the control's identifier number.

Attributes check boxes

The Attributes check boxes select the control's attributes.

Button Type radio buttons

The Button Type radio buttons define the check box type.


Button Type radio buttons (Borland check boxes)
Button Type radio buttons

The Button Type radio buttons define the type of check box.

Checkbox

Turn the Checkbox radio button on to define a Borland-style check box, a small, 3-dimensional, square box. You can put text on the left or right of the box. The box changes state only when the user clicks the mouse and holds the mouse button down.

Auto Checkbox

Turn the Auto Checkbox radio button on to define a check box that's identical to a Borland-style check box. When the box is turned on, a check mark is put in the box. This is the default setting.


Borland Radio Button Style dialog box overview
Borland Radio Button Style dialog box

The Borland Radio Button Style dialog box is where you define Borland-style radio button. To bring up the dialog box, place the radio button control in your dialog box and double-click it.

Caption input box

The Caption input box is where you enter the caption you want displayed with the control.

Control ID input box

The Control ID input box is where you enter the control's identifier number.

Attributes check boxes

The Attributes check boxes select the control's attributes.

Button Type radio buttons

The Button Type radio buttons define the radio button type.


Button Type radio buttons (Borland radio buttons)
Button Type radio buttons

The Button Type radio buttons define the type of radio button.

Auto Radiobutton

A radio button that's identical to a Borland-style radio button. When the button is turned on, all other mutually exclusive radio buttons are turned off and the diamond is filled with a smaller solid diamond. This is the default setting.

Radiobutton

A Borland-style small, diamond button, which can include text to the left or right of the button.

The button changes state only when the user clicks the mouse and holds the mouse button down.


Borland Shade Style dialog box overview
Borland Shade Style dialog box

The Borland Shade Style dialog box is where you define a Borland-style group box or horizontal or vertical line. To bring up the dialog box, place the Group Shade or Horizontal or Vertical Dip control in your dialog box and double-click it.

Caption input box

The Caption input box is where you enter the caption you want displayed with the control.

Control ID input box

The Control ID input box is where you enter the control's identifier number.

Shade Type radio buttons

The Shade Type radio buttons define the type of shade control.

Group check box

The Group check box identifies the first control in a group.

Visible check box

The Visible check box makes the image visible.


Shade Type radio buttons (Borland shade styles)
Shade Type radio buttons

The Shade Type radio buttons define the type of shade control.

Group Shade

The Group Shade radio button creates a gray concave box. The controls you place in the box are members of the same group.

Horizontal Dip

The Horizontal Dip radio button defines a concave horizontal line. This is the default horizontal line.

Vertical Dip

The Vertical Dip radio button defines a concave vertical line. This is the default vertical line.

Horizontal Bump

The Horizontal Bump radio button turns a concave horizontal line (created with the Horizontal Dip control) into a convex horizontal line.

Vertical Bump

The Vertical Bump radio button turns a concave vertical line (created with the Vertical control) into a convex vertical line.


Overview of accelerators
Accelerators

An accelerator is a key combination a user presses to perform a task in an application. It substitutes for a menu command and, like a menu command, creates a WM_COMMAND or WM_SYSCOMMAND message that tells the application what to do next.

You store accelerator definitions in an accelerator table (the accelerator resource). Each entry in the table defines the key combination a user must press and the command it produces. You can create multiple accelerator tables for different parts of a menu.

Resource Workshop provides you with an Accelerator editor that makes it easy to create and edit accelerators for your application.

When you work with accelerators, you perform five primary tasks. You:

Start the Menu editor

Start the Accelerator editor

Customize an accelerator table

Test the accelerator table

Save the accelerator table


Starting the Accelerator editor

Whether you create a new accelerator table or edit an existing one, you'll use the Accelerator editor. When the Accelerator editor starts, it displays an accelerator table that's ready for you to customize.

When you're working with accelerators, it's usually a good ideal to start the Menu editor and load the menu containing the menu commands that are associated with your accelerator. That way you can see the command text and the item IDs you need for defining accelerators.


Accelerator editor

The Accelerator editor is where you customize accelerator tables. The screen is divided into two panes that display editing information.


Accelerator editor panes

The Accelerator editor provides you with two different views of the accelerator table you're editing:

-	The outline pane shows the accelerators defined in the table

-	The dialog box pane is where you customize the currently highlighted accelerator

Use the mouse or the Tab  and Shift+Tab keys to move from pane to pane.

See Also

Accelerator editor


Outline pane (Accelerator editor)
Outline pane

The Outline pane, on the right, shows you all the accelerators defined in the table. The top line in the pane is the name of the accelerator table. The lines below it are accelerator entries.

An accelerator entry has two parts:

-	The first part is the accelerator key, which is either an ASCII key or a virtual key.

-	The second part is the item ID of the command to which the accelerator is tied. This ID is either an integer or the name of the identifier.

You can move around in this pane with the mouse, the scroll bar, or the arrow keys.

See Also

Accelerator editor panes


Dialog box pane (Accelerator editor)
Dialog box pane

The Accelerator editor dialog box pane is on the left side of the Accelerator editor screen. The dialog box lets you make changes to the accelerator that's currently highlighted in the Outline pane.

See Also

Accelerator editor panes


ASCII key

An accelerator ASCII key is a displayable key. It appears in the Key input box surrounded by quotation marks. It follows standard conventions for representing ASCII characters.

Because there is no convention for representing an ASCII key in combination with Alt, you need to turn on the Alt check box in the Accelerator editor dialog box if your accelerator uses Alt.

Typically, you don't use single ASCII characters as accelerator keys; instead you combine them with Alt or Ctrl, such as Alt+R or Ctrl+L.

See Also

Virtual key


Virtual key

An accelerator virtual key represents a key that typically doesn't produce a character, like a function key or an arrow key.

To represent a virtual key, you use standard Windows identifiers that stand for certain keys. These identifiers are defined in WINDOWS.H and must be entered in uppercase letters. You don't need to look up these identifiers if you enter accelerators in Key Value mode.

Virtual keys have no provision for Ctrl, Shift, and Alt combinations. If you use these keys, you need to turn on the appropriate Modifier check box in the Accelerator editor dialog box.

See Also

ASCII key


Creating an accelerator table

To create a new accelerator table,

1.	Open the project to which you want to add the accelerator table.

2.	Choose Resource|New to create a new resource for that project. The New Resource dialog box appears.

3.	In the Resource Type list box scroll to the ACCELERATOR entry, then either double-click it or click it and then click OK.

Resource Workshop displays the Accelerator editor with a default accelerator table you can begin customizing.

See Also

Starting the Accelerator editor


Editing an accelerator table

To edit an existing accelerator table, open the project in which the accelerator resource is stored and do one of the following:

-	Double-click the accelerator resource name in the Project window.

-	Highlight the accelerator resource name and choose Resource|Edit.

Resource Workshop displays the Accelerator editor with the accelerator table you've chosen loaded. You can customize your accelerator table.

You can also work with the accelerator table's resource script.

See Also

Starting the Accelerator editor


Customizing an accelerator table

Once you've loaded an accelerator table into the Accelerator editor, you're ready to customize it.

You can:

Add accelerators

Change accelerators

Copy accelerators

Delete accelerators


Adding accelerators

To add a new accelerator to the accelerator table, press Ins or choose Accelerator|New Item.

The new key appears in the Outline pane below the currently selected line with the default value of 0 (zero) in the Key input box and a unique integer value in the Command input box.

Use the Accelerator editor dialog box to customize the accelerator.

See Also

Customizing accelerators


Changing accelerators

To select a currently existing accelerator, use the mouse or press Ctrl+Up Arrow or Ctrl+Down Arrow to highlight the accelerator in the Outline pane. The Accelerator editor displays the current values of the accelerator in the Accelerator Editor dialog box.

Enter the new key combination in the Key input box.

See Also

Customizing accelerators


Copying accelerators

To move and copy accelerators, first, select the accelerator you want to move or copy in the Outline pane.

Then choose Edit|Cut or Edit|Copy. Select the resource in the outline after which you want to insert the accelerator and choose Edit|Paste.

See Also

Customizing accelerators


Deleting accelerators

Select the accelerator you want to delete in the Outline pane. Then press Del or choose Edit|Cut or Edit|Delete.

See Also

Customizing accelerators


Undoing and redoing changes

The Accelerator editor lets you undo and redo changes. Choose Edit|Undo or Edit|Redo, or use the accelerators Alt+Backspace (Undo) and Shift+Alt+Backspace (Redo).

See Also

Customizing accelerators


Testing your accelerator table

To avoid using the same key combination in more than one accelerator, you can debug an accelerator table by searching for duplicate key combinations.

Here's how:

1.	With the accelerator table open, choose Accelerator|Check Dup Keys.

2.	If two accelerators use the same key combination, the Accelerator editor displays a message and highlights the second accelerator. Make changes and continue debugging your accelerator table until you see an "OK" message.

See Also

Accelerators


Saving an accelerator table

It's a good idea to save your changes as you go along, rather than waiting for Resource Workshop to prompt you when you close the project.

There are two primary options you can use to save changes you've made to an accelerator table. You can

-	Save the entire project

-	Save the accelerator table in a resource script file


Saving an accelerator table in a resource script file

Saving the entire project also saves the accelerator table resource you're working on.

You can save just the accelerator table resource by choosing Resource|Save Resource As. This command brings up the Save Resource As dialog box where you enter the file name for the accelerator table resource. Then choose File|Add to Project to add the accelerator table resource file to your project.

See Also

Saving an accelerator table


Editing the resource script of an accelerator

In addition to creating and modifying accelerators directly with the Accelerator editor, you can also work with the accelerator's resource script.

To work with the resource script for an accelerator table, select the accelerator table from the Project window by clicking it. Then choose Resource|Edit As Text. Resource Workshop brings up the source script for the resource in its internal text editor.


Accelerator editor dialog box overview
Accelerator editor dialog box

The Accelerator editor dialog box is displayed on the left side of the Accelerator editor screen. This dialog box is where you make changes to the selected accelerator.

Command input box

The Command input box is where you enter the item ID for the command the accelerator is to execute.

Key input box

The Key input box is where you enter the accelerator key.

Key Type radio buttons

The Key Type radio buttons select the type of accelerator.

Modifier check boxes

The Modifier check boxes define key combinations.


Command input box

The Command input box is where you enter the item ID for the command the accelerator is to execute. You can enter either an integer or an identifier.

If you enter an identifier name and see the message "Create a new identifier: <identifier name>?", click No if you've entered the name incorrectly. If you enter a new identifier because you intend to add the associated menu item to the menu, click Yes. You'll see the New Identifier dialog box, where you add the new identifier. Be sure to enter a value that's different from the other item IDs in the associated menu.

If you have the associated menu loaded in the Menu editor, change windows to the Menu editor. Select the appropriate menu command and note the value in the Item ID input box. Enter that ID in the Command input box.

See Also

Adding accelerator text to menus


Key input box

The Key input box is where you enter the accelerator key (the key combination you want users to press to invoke the accelerator). You accelerator should be consistent with accelerators in other Windows applications.

You can enter the key in manual mode or in Key Value mode. If you're in manual mode, select the type of key with the Key Type radio buttons.

You can also enter the key combination with the Accelerator|Key Value menu command.


Manual mode

If you position the mouse on the Key Input box, or press Alt+Esc to exit from Key Value mode, you're in manual mode.

In manual mode, you specify all the information needed to represent the key. You must decide if the key is an ASCII key or a virtual key and enter it in the correct format.  You're required to turn on the appropriate Key Type radio button.

To use Alt in combination with an ASCII, check the Alt check box. To use Alt, Shift, and Ctrl with a virtual key, check one or more of the Modifiers check boxes.


Key Value mode

To enter Key Value mode, press Tab to move to the Key input box, or choose Accelerator|Key Value.

When you're in Key Value mode, the Accelerator editor does most of the work for you. Any key or key combination you press gets enter into the Key input box as the accelerator. The Accelerator editor decides if it's an ASCII or virtual key and turns on the appropriate Key Type radio button. If you press a key combination, the Accelerator editor turns on the appropriate Modifiers check boxes.

See Also

Manual mode


Key Type radio buttons

The Key Type radio buttons indicate whether your accelerator uses ASCII or virtual keys. If you're in Key Value mode, the Accelerator editor set these radio buttons automatically.

ASCII

Turn the ASCII radio button on if your accelerator uses an ASCII key.

Virtual Key

Turn the Virtual radio button on if your accelerator uses a virtual key.


Modifier check boxes

The Modifier check boxes define the keys the user holds down to activate the accelerator.

Alt check box

The Alt check box defines an accelerator that includes the Alt key.

Shift check box

The Shift check box defines an accelerator that includes the Shift key.

Control check box

The Control check box defines an accelerator that includes the Ctrl key.

Invert Menu Item check box

The Invert Menu Item check box disables the flash feature.


Alt check box

Turn the Alt check box on if the accelerator is a key combination that includes the Alt key (for example, Alt+W).


Shift check box

Turn the Shift check box on if the accelerator is a key combination that includes the Shift key (for example, Shift+F1).


Control check box

Turn the Control check box on if the accelerator is a key combination that includes the Ctrl key (for example, Ctrl+W).


Invert Menu Item check box

The Invert Menu Item check box disables the flash feature.


Flash feature

Windows has a built-in function that flashes a menu-bar command when the user presses an accelerator key associated with that menu-bar command. The feature lets the user know which menu the accelerator key is on.

The flash feature is on by default when you create an accelerator. You can disable this feature by turning off the Invert Menu Item check box.


Overview of string tables
String tables

A string table is a table that holds error messages, prompts, or any other text strings your application needs to display. You can store multiple string tables in your project file or in resource files.

Typically, you'll define a separate string table for each logical grouping of your program. Defining strings of text as a separate resource makes it easy to edit the text without changing your source code.

When you work with string tables, you perform four tasks. You

Start the String editor

Customize a string table

Save a string table

Test a string table


Starting the String editor

Whether you create a new string table or edit an existing one, you'll use the String editor.

How you start the String editor depends on whether you want to create a new string table or edit an existing one.


Creating a string table

To create a new string table,

1.	Open the project you want to add the string table to.

2.	Choose Resource|New to create a new resource for that project. The New Resource dialog box appears.

3.	In the Resource Type list box scroll to the STRINGTABLE entry, then either double-click it or click it and click OK.

Resource Workshop displays the String editor and places a reference to the new string table in your Project window. You're ready to customize the string table.

See Also

Starting the String editor


Editing a string table

To edit an existing string table, open the project in which the string table resource is stored and do one of the following:

-	Double-click the string table name in the Project window.

-	Highlight the string table name and choose Resource|Edit.

Resource Workshop displays the String editor. The string table you've chosen is loaded in the editor, so you can customize it.

You can also work with the string table's resource script.

See Also

Starting the String editor


String editor

The String editor is where you'll customize string tables.

The String editor screen is divided into three areas that represent the required parts of a string table entry:

-	The ID source input box is where you enter the string's integer ID or identifier.

-	The ID value display box shows the string's integer ID.

-	The string input box is where you enter the text of the string.

See Also

Windows and string resources


Windows and string resources

Each string in a string table must have a unique integer ID. You can also assign more descriptive IDs with identifiers.

Windows groups strings into segments that contain 16 strings each. Strings with IDs from 0 to 15 make up the first segment, 16 to 31 are in the second segment, and so on. When you compile resources, the strings are added to the executable file in segments. At runtime, the strings are loaded into memory in segments.

The way you assign integer IDs to your string tables can affect the size of your executable file and the way your application uses memory. When your application requires a string, Windows loads the entire string segment that contains the string into memory. Each unused ID in a segment takes up one byte of memory.

To use memory efficiently, you should group your strings logically. For example, if one part of your application requires 5 strings, number them from 0 to 4. If a second part of your application requires 9 strings, put them into the second segment by numbering the strings 16 to 24. Then Windows can load related strings all at once, without having to load other strings that won't be needed.


Customizing a string table

Once you've loaded a string table into the String editor, you're ready to customize it.

You can:

Edit an existing string

Enter a string in a new string table

Add a string to an existing string table


Editing an existing string

The String editor makes it easy to change individual strings. To select a string with your mouse, click the string you want to edit. If you're using your keyboard, press Tab, Up Arrow, or Down Arrow to move through the table. Place your cursor on the string you want to edit.

You can:

Change a string

Restore changed values

Delete a string


Changing a string

You can erase the values in the ID Source and String input boxes for any string, and then type new values.

You can't directly change what's displayed in the ID Value display box, but the String editor updates it based on what you type in the ID Source input box.

See Also

Editing existing strings


Restoring changed string values

Choose Stringtable|Restore Item to restore changed values. You can also choose Edit|Undo.

See Also

Editing existing strings


Deleting a string

To delete a string, highlight the string and then choose either Edit|Cut or Stringtable|Delete Stringtable Item.

See Also

Editing existing strings


Entering a string in a new string table

To create a new string in a new string table,

1.	Enter an ID Source for the string in the ID Source input box. Based on the ID Source that you type, the String editor finds the appropriate integer value for the ID Value display box.

2.	Either press Tab or click the String input box, then type the text string.

3.	Press Enter to accept the new value, or Ins to accept the value and insert a new one.

See Also

Customizing a string table


Adding a string to an existing string table

To add a new string to an existing string table,

1.	Select the string above the line where you want to add the new string.

2.	Press Ins or choose Stringtable|New Stringtable Item.

3.	Enter an ID Source for the string in the ID Source input box. Based on the ID Source that you type, the String editor finds the appropriate integer value for the ID Value display box.

4.	Either press Tab or click the String input box, then type the text string.

5.	Press Enter to accept the new value, or Ins to accept the value and insert a new one.

See Also

Customizing a string table


Editing the resource script of a string table

If you want to work with the source script of a string table, select the string table in the Project window, then choose Resource|Edit As Text.

Resource Workshop brings up the source script for the resource in its internal text editor. You can change the string or the identifier.

See Also

Editing a string table


Changing the string in the resource script

To change a string,

1.	Find the string you want to edit and make the necessary changes. Only change the text that appears between the quotation marks.

2.	Double-click the editor's Control-menu box.

3.	Click Yes in response to the prompt "Resource has changed. Compile?".

Resource Workshop compiles your changes and saves them. If there's a syntax error, you're put back in the text editor so you can correct it.


Changing the identifier in the resource script

If you change the string's identifier in the text editor, you must have already added the identifier to the appropriate identifier file. If you haven't, you'll see the error "Expecting unsigned short integer." This error indicates that the compiler tried to interpret the identifier name, but couldn't find an identifier for it.

If the compiler can't find an identifier because one doesn't exist, you can add a new one:

1.	Choose Resource|Identifiers. You'll see the Identifiers dialog box.

2.	Choose the New button.

3.	Enter the new identifier name and value in the New Identifier dialog box.

4.	Choose the file you want to store the identifier in and click OK.

5.	Select the String table entry in the Project window and choose Resource|Edit As Text.

6.	Double-click the editor's Control-menu box.

7.	Click Yes in response to the prompt "Resource has changed. Compile?".


Saving a string table

It's a good idea to save your changes as you go along, rather than waiting for Resource Workshop to prompt you when you close the project.

Resource Workshop automatically places a STRINGTABLE entry in your resource script in the Project window when you create a new string table resource. To save your string table, you need to save the entire project. Choose File|Save Project.


Testing a string table

To test your string table, you'll need to compile the resource script file into an executable file. Then you can run the executable file to see if your strings appear as you think they should.


ID Source input box

The ID Source input box holds the string's ID. You can enter an integer ID or an alphanumeric identifier that stands for an integer.

If you type an alphanumeric identifier that doesn't represent an integer, the String editor prompts you to create a new identifier when you press Enter or choose a menu command. If you click Yes to create a new identifier, you'll see the New Identifier dialog box, where you add the new identifier.


ID Value input box
ID Value display box

The ID Value display box holds the appropriate integer value for the string's ID. You can't enter a value into the box or change the value in it. The String editor enters the value based on the ID Source that you type.


String input box

The String input box holds the text of the string. Each string can be a maximum of 255 characters long. It can contain any C-type escape sequences, including:

-	\n (newline)

-	\t (tab)

-	\r (carriage return)

-	\\ (backslash)

-	\" (double quote)

When the Resource Workshop compiler encounters a C-type escape sequence in a string entry, it produces the corresponding ASCII hexadecimal value in the object code. It's up to your program to interpret the value correctly.


Paint editor
The Paint editor

The Resource Workshop Paint editor is a tool you use when you create or edit any bitmapped resource, including the following standard bitmapped resources:

-	Bitmaps

-	Cursors

-	Fonts

-	Icons

To learn more about using the Paint editor, go to one of these Help screens:

Paint editor features

Paint editor options

Starting the Paint editor


Setting Paint editor options
Paint editor options

Use the Options|Editor Options command to set the Paint editor options.

This command displays the Set Paint Editor Options dialog box, where you

-	specify that the images in both window panes be updated when you draw

-	display a grid on zoomed images

-	save a custom color palette


Starting the Paint editor

When you create or open a file containing a bitmapped resource, Resource Workshop loads the resource and automatically puts you in the Paint editor. Loading cursors, fonts, and bitmaps into the Paint editor is different than loading icons.

Loading cursors, fonts, and bitmaps

To load a cursor, font, or bitmap, either double-click on the resource entry in the Project window or select the resource and choose Resource|Edit. Resource Workshop starts the Paint editor and displays the resource, ready for editing.

Loading icons

When you double-click an icon resource in the Project window, you see an Icon window before you see the Paint editor. This window lists different images of your icon. (If you're creating a new icon, you won't see this window.)

To select an icon image in the Icon window and start the Paint editor, you:

-	double-click an existing version of the icon

-	select it and choose Images|Edit Image

-	use Images|New Image to create a new image of the icon


Paint editor features

The Paint editor supplies features commonly used to edit all bitmapped resources, as well as features particular to each type of resource. The primary way it provides unique features is to change the third menu item from the right on the menu bar, so that it corresponds to the type of resource being edited.

The common Paint editor functions that apply to all bitmapped resources are:

Colors palette

Status line and bar

Tools palette

Window panes


Colors palette overview
Colors palette

The Paint editor's 16-color Colors palette makes it easy to choose the colors you want. You can work with a Colors palette even if your image is black and white.

You use the Colors palette to choose:

-	a foreground color

-	a background color

-	transparent and inverted areas (for icons and cursors only)

You can move the palette anywhere you want it. You can also hide it and show it with the menu commands or the palette's control menu. If you're creating a bitmap or icon, you can choose the number of colors you want to include in your resource.

See Also

Customizing colors


Foreground color

The foreground color is the color you draw with the left mouse button. It's typically one of the colors you use to create the features of your resource, such as lines, boxes, shading, and so on. The foreground color is indicated by FG on the Colors palette.

See Also

Using a foreground color


Using a foreground color

To use a foreground color,

1.	Click the left mouse button on the color you want in the Colors palette. You see the letters FG appear on that color (unless it's already selected as a background color, in which case you see FB).

2.	From the Tools palette, choose a tool that draws or paints, and with the left mouse button click or drag the tool on your image to draw or paint with the foreground color.

The Eraser tool operates in the opposite fashion from the drawing tools. Dragging it with the left mouse button produces the background color, and dragging it with the right mouse button produces the foreground color.

See Also

Colors palette


Background color

The background color is the color you draw with the right mouse button and is usually the color that appears to underlie your drawing. It's also the color that's left behind when you select an area and delete or move it. The background color is indicated by BG on the Colors palette.

See Also

Using a background color


Using a background color

To use a background color,

1.	Click the right mouse button on the color you want in the Colors palette. You see the letters BG appear on that color (unless it's already selected as a foreground color, in which case you see FB).

2.	From the Tools palette, choose a tool that draws or paints, and with the right mouse button click or drag the tool on your image to draw or paint with the background color.

The Eraser tool operates in the opposite fashion from the drawing tools. Dragging it with the left mouse button produces the background color, and dragging it with the right mouse button produces the foreground color.

See Also

Colors palette


Transparent and inverted areas

At runtime, transparent and inverted areas show up as see-through parts of your cursor or icon.

-	A transparent area allows the color of the area behind the icon or cursor to show through.

−	An inverted area behaves like a transparent area except that it inverts the color over which you place the icon or cursor.

A new icon or cursor image automatically has a transparent background. If you create an image and draw a single line or cross hair in it, you'll only see that line when you test the image against the desktop color; you won't see a box with a background color and a line or cross hair on it.

See Also

Using transparent and inverted attributes


Using transparent and inverted attributes

Transparent and inverted attributes appear in the Colors palette as the choices Transparent and Inverted.You pick transparent and inverted attributes the same way you pick any color in the Colors palette, and you draw and paint transparent and inverted areas the same way you draw and paint with other foreground and background colors.

The long rectangles in the Colors palette that represent Transparent and Inverted also show what color will display for transparent and inverted areas when you edit your icon or cursor.

Unlike foreground and background colors, however, you don't have complete control over what will be displayed in transparent and inverted areas in your program. The color displayed depends on the color of the area behind the icon or cursor.

If you want a background color instead of a transparent background for your icon or cursor image, your first steps in drawing it should be to select a background color, choose the Paint Can tool, and click with the right mouse button to fill it with the background color. For cursors, typically, the background of the cursor remains transparent so the user can see where the cursor is located.

See Also

Changing the color of transparent and inverted areas


Hiding and showing the color palette
Hiding and showing the Colors palette

If you want to hide the Colors palette, you can close it by double-clicking the control menu icon in the upper left corner of the palette.

You can also use the Hide Palette and Show Palette commands. The menu where you'll find these commands depends on the type of resource you're currently editing. For example, if you're editing an icon, you'll find the Show Palette and Hide Palette commands in the Icon menu.

Only one of these commands appears at a time. If the Colors palette is visible, you'll only see the Hide Palette command. The Show Palette command appears only if the Colors palette is hidden.


Choosing the number of colors for a resource

When you create a bitmap or an icon, Resource Workshop displays a dialog box where you choose how many colors you want in your resource.

For bitmaps, this dialog box is the New Bitmap Attributes dialog box. For icons, it's the New Icon Image dialog box.

While you're editing a bitmap or icon, you can change the number of colors in the image using the Size And Attributes command. Depending on the type of resource you're editing, you'll find the Size And Attributes command in the Bitmap menu or the Icon menu.

You can include up to 256 colors in your bitmap or icon. The number of colors you can use (and see in the Colors palette) depends on the type of display driver you're using with Windows. The standard Windows VGA driver supports a fixed set of only 16 colors.


Customizing colors

When you're editing a color bitmap or icon, you can modify the Colors palette to include any colors supported by your display driver.

It won't make sense to do this if the Colors palette already includes all the colors supported by your computer. But if your display driver is capable of displaying 256 colors and you're working with a 16-color image, you can include any of the 256 colors in the 16-color Colors palette.

When you're editing a cursor or icon, you can change the colors used to display transparent or inverted areas of the image.


Modifying the Colors palette

If you're editing a color bitmap or icon, you can edit a color in the Colors palette,

To edit a color, do one of the following:

-	Double-click it.

-	Use the Edit Foreground Color and Edit Background Color commands. Depending on the type of resource you're editing, you'll find the Edit Color commands on the Bitmap or Icon menu.

Resource Workshop displays the Edit Color dialog box where you can specify a new color.


Changing transparent and inverted areas
Changing the color transparent and inverted areas

Changing the colors the Paint editor displays for transparent and inverted areas is similar to changing a regular color.

To change the color of a transparent or inverted area,

-	Double-click the bar under Transparent or Inverted in the Colors palette.

-	Select either Transparent or Inverted as the foreground or background color.

-	If you're working with icons, choose Icon|Edit Foreground Color or Icon|Edit Background Color.

−	If you're working with cursors, choose Cursor|Set Transparent Color.

Resource Workshop displays the Set Transparent Color dialog box where you can change the color.


Edit Color dialog box overview
Edit Color dialog box

The Edit Color dialog box is where you customize colors.

When you use this dialog box to customize a 256-color palette, you need to turn off the Save With Default Device Colors check box in the Set Paint Editor Options dialog box to allow Resource Workshop to save your customized palette before you leave the Paint editor.

Palette index

The Palette index shows where the customized color goes in the Colors palette.

RGB input boxes

The RGB input boxes are where you enter values for customized colors.

RGB slide bars

The RGB slide bars are where you choose customized colors.

Default button

The Default button retrieves the color from the default palette.

System button

The System button retrieves the color from the system palette.

Color boxes

The Color boxes display the color you requested and the closest color permitted.

When you're finished changing colors, click OK or press Enter to put the new color in the Colors palette.


Palette index (Edit Color dialog box)
Palette index

The Palette index helps you identify where the customized color goes in the Colors palette.

The Colors palette boxes are numbered from left to right across each row, starting with zero at the top left box. For example, in the default 16-color Colors palette, the number starts with 0 for black and continues to 7 for dark gray. It starts on the left side of the next row with 8 for light gray, and continues across to 15 for white.

The Palette index value changes when you enter new values in the RGB input boxes or use the RGB slide bars to choose a color.


RGB input boxes (Edit Color dialog box)
RGB input boxes

The RGB input boxes are where you edit a color. Just type in new values in the left column for the red, green, and blue (RGB) components of the color. (You can also use the RGB slide bars on the right side of the dialog box.)

Resource Workshop displays the closest matching color for the new RGB values in the Color boxes at the top of the dialog box.

After you enter a value in the left column, click on another box in the column to get the new value to take effect.


RGB slide bars (Edit Color dialog box)
RGB slide bars

The RGB slide bars are where you edit a color. Just move the cursor on the Red, Green, and Blue slide bars until the color you want is displayed in the Color boxes. (You can also use the RGB input boxes on the left side of the dialog box.)


Color boxes (Edit Color dialog box)
Color boxes

The Color boxes display the color you requested and the closest color permitted.

Requested Color box

The Requested color box displays the closest matching color for the RGB values you've selected in the RGB input boxes or slide bars.

Granted Color box

The Granted color box matches the RGB values to the closest color permitted by the limits of the Colors palette. You'll only see the Granted color box change color if the closest match is different from the current color.


Default button (Edit Color dialog box)
Default button

The Default button retrieves the color from the default palette (a Windows stock object) that has the same index as the Palette index.


System button (Edit Color dialog box)
System button

The System button retrieves the colors from the system palette that has the same index as the Palette index. This button is disabled for VGA displays, since the VGA device driver does not support logical palettes.


Set Transparent Color dialog box overview
Set Transparent Color dialog box

The Set Transparent Color dialog box is where you change the colors the Paint editor displays for the transparent and inverted areas in your icon or cursor.

When you use this dialog box to work on a 256-color palette , you need to turn off the Save With Default Device Colors check box in the Set Paint Editor Options dialog box to allow Resource Workshop to save your customized palette before you leave the Paint editor.

RGB input boxes

The RGB input boxes are where you choose values for customized colors.

RGB slide bars

The RGB slide bars are where you choose customized colors.

Color boxes

The Color boxes display the color you requested and the closest color permitted.

When you're finished changing colors, click OK or press Enter to put the new color in the Colors palette.


RGB input boxes (Set Transparent Color dialog box)
RGB input boxes

The RGB input boxes are where you edit a color. Just enter new values in the left column for the red, green, and blue (RGB) components of the color. (You can also use the RGB slide bars on the right side of the dialog box.)

Resource Workshop displays the closest matching color for the new RGB values in the Color boxes at the top of the dialog box.

If you enter a value in the left column, click on another box in the column to get the new value to take effect.


RGB slide bars (Set Transparent Color dialog box)
RGB slide bars

The RGB slide bars are where you edit a color. Just move the cursor on the Red, Green, and Blue slide bars until the color you want is displayed in the Color boxes. (You can also use the RGB input boxes on the left side of the dialog box.)


Color boxes (Set Transparent Color dialog box)
Color boxes

Three Color boxes are displayed at the top of the dialog box.

Requested Color box

The Requested color box displays the closest matching color for the RGB values you've selected in the RGB input boxes or slide bars.

Granted Color box

The Granted color box matches the RGB values to the closest color permitted by the limits of the color palette. You'll only see the Granted color box change color if the closest match is different from the current color. This is the color of the transparent areas in your image.

Inverse Color box

The Inverse color box shows the inverse of the color in the Granted Color box. This is the color of the inverted areas in your image.


Window panes

The Paint editor lets you look at two different views of the image you're creating or editing.  You can split the window vertically to show the two views side-by-side, or you can split the window horizontally to show one view above the other. Use the View menu to split the window. To display a single image, just move the line that divides the windows off the screen. To change the size of the windows, move the line.

One or both views can be zoomed.


Status line and bar

At the bottom of the Paint editor is a status line that displays information about commands and paint tools. It's divided into left and right sides.

There's also a status bar at the top of the screen that shows information about the resource you're working with.


Status line: right side

The right side of the status line tells you which paint tool you're using and its pixel coordinates on the screen. Depending on the tool you're using, you might see color information.

See Also

Status line


Status line: left side

The left side of the status line displays information about the currently highlighted menu command. For example, if you choose the View menu to zoom an image, the status line displays "Magnify active window."

See Also

Status line


Tools palette overview
Tools palette

When you open a resource in the Paint editor, the Tools palette is in the upper right of the edit window. You use the Tools palette to choose the Paint editor tool you want to work with.

You can move the Tools palette around, and you can hide it or show it.

Here's a list of the tools in the Tools palette:

Airbrush

Empty frames

Eraser

Filled-in frames

Line

Paintbrush

Paint can

Pick rectangle

Pen

Scissors

Text

Zoom

There are four styles at the bottom of the Tools palette:

Airbrush shape

Paintbrush shape

Pen style

Pattern

In addition, there's also a Hand tool that you can use to move a zoomed image. It's not displayed in the Tools palette.


Hiding and showing the Tools palette

To hide the Tools palette,

-	Double-click the Tools palette's Control-menu box or choose Hide from the Tools palette's Control menu.

-	Choose the Hide Toolbox command. This command is located on the menu bar selection that corresponds to the type of resource you're working with.

To open the Tools palette,

-	Choose the Show Toolbox command on the menu bar selection that corresponds to the type of resource you're working with.


Pick Rectangle tool (Paint editor)
Pick Rectangle tool

You use the Pick Rectangle tool to select a rectangular area of your image for copying, moving, or deleting. To select an area, click the left mouse button and drag the mouse until the flashing outline includes the area you want. Then release the mouse button. Clicking either mouse button outside the outline deselects the area.

Once you've selected an area, you can use the commands in the Edit menu to cut, copy, delete, duplicate, or paste into the selected area. You can also use the mouse to move or duplicate the area. In addition, you can align or resize the selected area.

See Also

Tools palette


Scissors tool

The Scissors tool performs basically the same function as the Pick Rectangle tool: it selects an area of an image. However, with the scissors you can select and move areas of any shape, not just rectangles. To select an area, click the left mouse button and drag the scissors until the flashing outline includes the area you want, then release the mouse button.

Once you've selected an area, you can use the commands in the Edit menu to cut, copy, delete, duplicate, or paste into the selected area. the selected area. You can also use the mouse to move or duplicate the area. In addition, you can align or resize the selected area.

See Also

Tools palette


Zoom tool

You can use the Zoom tool to zoom the entire image, or you can outline an area of an image that you'd like to zoom, and have Resource Workshop zoom that area.

See Also

Tools palette


Zooming the entire image

To zoom in on the entire image, double-click the Zoom tool.

Resource Workshop increases magnification to the next higher multiple of 400%, but no more than 1600%. You can also choose View|Zoom In to perform the same function on the currently selected window.

To zoom out on the entire image, select the Zoom tool, hold down the Shift key, and double-click the Zoom tool.

Resource Workshop decreases magnification to the next lower multiple of 400%, but no less than the actual size of the image (100%). You can also choose View|Zoom Out to perform the same function on the currently selected window.

The Paint editor uses the center of the image as a reference when zooming the entire image.

See Also

Zooming images


Zooming a portion of the image

To select an area you want to magnify, click the left mouse button and drag the Zoom tool. When the flashing outline includes the area you want to see, release the mouse button. Resource Workshop zooms the area to the largest zoom percentage that will fit in the window pane.

To zoom the area back out, choose View|Zoom Out or hold down the Shift key and double-click the Zoom tool.

See Also

Zooming images


Eraser tool

The eraser works like a square paintbrush.To erase an entire image, double-click the Eraser tool.

Use the left mouse button to reveal the current background color.  (BG on the Colors palette). Use the right mouse button to reveal the current foreground color.  (FG on the Colors palette).

Since you use the eraser to reveal colors, the buttons on the mouse are the opposite of other tools you use to paint. For example, if you're using the paintbrush, you'll use the left mouse button to paint the foreground color. But with the eraser, the left mouse button reveals the background color.

Before you use the eraser, you might want to check the current colors in the Colors palette.

See Also

Tools palette


Pen tool

Use the pen to paint free-form lines and shapes, either as quick sketches in an unzoomed image or a pixel at time in a zoomed image.

To sketch with the Pen tool, click a mouse button and drag the pen across your image. Release the mouse button when you've finished sketching the line.

Use the left mouse button to sketch with the current foreground color. (FG on the Colors palette). Use the right mouse button to sketch with the current background color. (BG on the Colors palette).

Before you paint a line, you might want to select the pen style and the foreground and background colors.

See Also

Tools palette


Paintbrush tool

Use the Paintbrush tool to paint free-form patterns that vary more in width and type than those you can produce with the Pen tool. To paint, click a mouse button and drag the paintbrush across your image. As you drag the paintbrush, Resource Workshop paints a free-form line. Release the mouse button when you've finished painting.

When you choose the Paintbrush tool, you get a cursor that represents the current brush shape. The cursor is the same size as the area actually painted only for the actual-size image (the 100%, unzoomed image). If you zoom an image, the area painted is larger than the cursor.

Use the left mouse button to paint with the current foreground color. (FG on the Colors palette). Use the right mouse button to paint with the current background color. (BG on the Colors palette).

Before you use the paintbrush, you might want to select the foreground and background colors and the paintbrush shape and pattern.

See Also

Tools palette


Airbrush tool

The Airbrush tool paints free-form patterns on your image. It works like spray paint. If you drag it slowly across your image, it paints a thick pattern, but if you drag it quickly, it paints a scattered, thinner pattern.

When you choose the Airbrush tool, you get a cursor that represents the current brush shape. The cursor is the same size as the area actually painted only for the actual-size image (the 100%, unzoomed image). If you zoom an image, the area painted is larger than the cursor.

To use the airbrush, you can either click a mouse button once and drag the airbrush, or you can click it repeatedly, as if you were repeatedly pressing the nozzle of a spray can.

Use the left mouse button to paint with the current foreground color. (FG on the Colors palette). Use the right mouse button to paint with the current background color. (BG on the Colors palette).

Before you use the airbrush, you might want to select the foreground and background colors and specify the airbrush shape and pattern.

See Also

Tools palette


Paint Can tool

Use the paint can to fill an area of your image with the currently selected color. The paint can fills in any area of your image that is a single color.

If you use the paint can on an area that's not entirely surrounded by other colors, the color leaks out into other parts of the image that are the same color as the original area.

To use the paint can, point the paint can's cross hairs in the portion of the image you want to fill, then click a mouse button.

Use the left mouse button to paint with the current foreground color. (FG on the Colors palette). Use the right mouse button to paint with the current background color. (BG on the Colors palette).

Before you use the paint can, you might want to specify the foreground and background colors.

See Also

Tools palette


Line tool

Use the Line tool to paint straight lines by clicking a mouse button and dragging the Line tool across your image. Release the mouse button when you've finished drawing the line.

If you want the lines you paint to be limited to 45-degree increments, hold down Shift as you paint the line. With Shift down, you can only paint a horizontal or vertical line or a line on a 45-degree angle.

Use the left mouse button to paint with the current foreground color. (FG on the Colors palette). Use the right mouse button to paint with the current background color. (BG on the Colors palette).

Before you paint a line, you might want to specify the line style and choose the foreground and background colors.

See Also

Tools palette


Text tool

To add text to your image, choose the Text tool and click where you want the text to begin. A flashing cursor appears and you can begin typing text.

Before you use the Text tool, you might want to specify how and where you want the text displayed:

-	Use Text|Font to specify the typeface, size, and style of the text.

-	Use the Text|Align (Left, Center, Right) commands to specify how the text is aligned.

Text is always displayed in the current foreground color. Before you type text, you might want to specify the foreground color by clicking the left mouse button on the color you want in the Colors palette.

See Also

Adding text to a resource

Tools palette


Empty frame tools

There are three tools you can use to paint an empty frame in your image:

Ellipse

Rectangle

Rounded Rectangle

These tools paint a frame using the current line style and foreground color.

To paint an empty frame,

1.	Choose the tool with the appropriate shape.

2.	Point the tool's cross hair where you want to start a corner of the frame.

3.	Click a mouse button and drag the frame tool until the frame outline surrounds the area you want.

4.	Release the mouse button.

Before you paint a frame, you might want to specify the frame style and choose the foreground and background colors.


Ellipse tool

Use the Ellipse tool to paint an ellipse-shaped empty frame in your image.

See Also

Empty frame tools


Rectangle tool

Use the Rectangle tool to paint a rectangle-shaped empty frame in your image.

See Also

Empty frame tools


Rounded Rectangle tool

Use the Rounded Rectangle tool to paint an empty frame, shaped like a rounded rectangle, in your image.

See Also

Empty frame tools


Filled-in frame tools

There are three tools you can use to paint filled-in frames in your image:

Filled Ellipse

Filled Rectangle

Filled Rounded Rectangle

These tools paint a frame using the current line style. The frame is filled using the current pattern and color. Specify a null pen width in the Set Pen Styles dialog box if you don't want Resource Workshop to paint a frame around the filled-in pattern.

To paint a filled-in frame,

1.	Choose the tool with the appropriate shape.

2.	Point the tool's cross hairs where you want to start a corner of the frame.

3.	Click a mouse button and drag the frame tool until the frame outline surrounds the area you want.

4.	Release the mouse button.

Use the left mouse button to paint with the current foreground color. (FG on the Colors palette). Use the right mouse button to paint with the current background color. (BG on the Colors palette).

Before you paint a frame, you might want to specify the frame style and pattern and choose the foreground and background colors.


Filled Rectangle tool

Use the Filled Rectangle tool to paint a rectangle-shaped filled-in frame in your image.

See Also

Filled-in frame tools


Filled Rounded Rectangle tool

Use the Filled Rounded Rectangle tool to paint a filled-in frame, in the shape of a rounded rectangle, in your image.

See Also

Filled-in frame tools


Filled Ellipse tool

Use the Filled Rounded Ellipse tool to paint an ellipse-shaped filled-in frame in your image.

See Also

Filled-in frame tools


Hand tool

Sometimes when you display a zoomed image, not all of it fits in the display. You can use the Hand tool to move the image around to see other parts of it.

Unlike other tools, the Hand tool isn't included in the Tools palette. But you can change any tool (except the Text tool) into a hand by holding down Ctrl.

The Hand tool is a grabbing tool because you just click the hand on the image and drag it in the direction you want it to move.

See Also

Tools palette


Pattern style

Some of the tools in the Tools palette paint a pattern on your image.

These tools are the:

Airbrush

Filled Ellipse

Filled Rectangle

Filled Rounded Rectangle

Paintbrush

You choose the pattern that's painted when you use those tools.

The current pattern is displayed in the lower right corner of the Tools palette.


Pen style

Some of the tools in the Tools palette draw a line on your image.

These tools are the:

Line

Ellipse

Pen

Rectangle

Rounded Rectangle

You choose the style that's drawn when you use those tools.

The current pen style is displayed in the lower left corner of the Tools palette.


Airbrush shape

The Airbrush tool paints free-form patterns on your image. You choose the shape of the Airbrush tool.

The current shape is displayed above the Pattern style in the Tools palette.


Paintbrush shape

The Paintbrush tool paints free-form lines on your image. You choose the shape of the Paintbrush tool.

The current pattern is displayed above the Pen style in the Tools palette.


Zooming images

Resource Workshop can show you an image at its actual size or it can zoom an image up to 1600%. You can use the Zoom tool or the View menu to zoom the image in one or both of the two window panes in the Paint editor. Resource Workshop always zooms the current image.

With the Zoom tool, you can outline an area of an image that you'd like to zoom, and Resource Workshop will use an appropriate zoom percentage to show you that area. If you use the Zoom tool, Resource Workshop can zoom an image in multiples of 100% up to 1600%.

You can also zoom in and out using the View menu. If you use the View menu commands, you can zoom an image to 400%, 800%, 1600%, or back to its actual size.

See Also

Displaying a grid in a zoomed window

Moving a zoomed image around

Seeing which part of the image is zoomed

Using the zoom accelerators


Using the zoom accelerators

Three accelerators are listed on the View menu. They are easy to remember and make zooming much quicker.

Instead of choosing the View commands repeatedly until you've adjusted the image to your liking, it's much easier to press Ctrl+Z or Ctrl+O a few times. If you select the Zoom tool, you can simply double-click in the image to zoom in and Shift-double-click to zoom out. You can also press Ctrl+A to return the image to its actual size.

View command	Accelerator	Mouse action on Zoom tool

Zoom In	Ctrl+Z	Double-click

Zoom Out	Ctrl+O	Shift+double-click

Actual size	Ctrl+A	None

See Also

Zooming images


Seeing which part of the image is zoomed

If you zoom an image to a size that's too large to fit in the pane, and the image is displayed at its true size in the other window pane, Resource Workshop places a dotted rectangle over the unzoomed image. This dotted rectangle indicates the portion of the image currently displayed in the zoomed window pane.

See Also

Zooming images


Moving a zoomed image around

If a zoomed image is too large to fit in a window pane, Resource Workshop displays scroll bars to let you move the image around and see different parts of it.

You can also use the Hand tool to grab an image and move it. To turn the current tool into a Hand tool, press Ctrl. Then click in the image and drag it in the direction you want it to move. You might have to click and drag several times if you want to move a zoomed image more than the total width or length of the window pane.

If the image is also displayed unzoomed in another window pane, you can watch the dotted outline move as you look at different parts of the zoomed image.

See Also

Zooming images


Displaying a grid in a zoomed window

To help you control images on a pixel-by-pixel basis, you can display a grid on any zoomed image by choosing Options|Editor Options and turning on the Grid On Zoomed Windows check box. Each square of the grid represents a single pixel.

See Also

Zooming images


Adding text to a resource

You can add text to any resource that was created with the Paint editor. To add text to a resource, click the Text tool. Resource Workshop displays a flashing text cursor. Move the cursor to the location in your image where you want text to start. Then type the text you want.

To determine how text is displayed, use the Text menu commands either before or immediately after you type the text. You can change the text color by selecting a new color from the Colors palette. You can also press the right mouse button if you want the text to be displayed in the current background color.

If you click another tool or click in another area of the image after entering text, you can't change anything in the text you've just entered. At that point, the text becomes just another part of the bitmap.

See Also

Aligning text

Choosing fonts, size, and text style


Aligning text

To align text, use the Text|Align Left,Text|Align Center, and Text|Align Right commands.

Each of the Align commands controls where the text is displayed in relation to where you initially clicked before you typed the text. You can use an Align command before you type text or immediately after you finish typing. After you click to make another selection, you can't change the alignment of the text you've just typed.

See Also

Adding text to a resource


Choosing fonts, size, and text style

To choose how text is displayed, use the Text|Font command. After you click to make another selection, you can't change the font of the text you've just typed.

See Also

Adding text to a resource


Choosing brush shapes

You can paint images in a resource using the Paintbrush tool or the Airbrush tool. You choose the shape of these tools.

The current paintbrush and airbrush shapes are always displayed as the top two of the four styles at the bottom of the Tools palette.

You can choose a paintbrush shape or an airbrush shape in one of the following ways:

-	For a paintbrush shape, use the Options|Brush Shape command.

-	For an airbrush shape, use the Options|Air Brush Shape command.

-	Click the Paintbrush shape or the Airbrush shape style selection in the Tools palette.

If you're choosing a Paintbrush shape, you'll see the Brush Shape dialog box. If you're choosing an Airbrush shape, you'll see the Airbrush Shape dialog box.


Choosing paint patterns

Certain paint tools can paint a pattern on your image.

These tools are the:

Airbrush

Filled Ellipse

Filled Rectangle

Filled Rounded Rectangle

Paintbrush

The current pattern is displayed in the lower right corner of the Tools palette.

You can choose a pattern in one of the following ways:

-	Choose Options|Pattern.

-	Click the Pattern style selection in the Tools palette.

You'll see the Set Pattern dialog box, where you choose a pattern.


Choosing a line style

You can control the line style produced by any of the following tools:

Line

Ellipse

Pen

Rectangle

Rounded Rectangle

The current line style is displayed in the lower left corner of the Tools palette.

You can choose a line style in one of the following ways:

−	Choose Options|Pen Style.

-	Click the Pen style selection in the Tools palette.

You'll see the Set Pen Style dialog box, where you choose a line style.


Aligning a selected area

You can align a selected area of an image with the top, bottom, sides, or center of the current edit window. Aligning the selected area moves it to the location you specify, just as if you had selected the area and moved it with the mouse.

To align an area you've just selected, choose Options|Align. The Align Selection dialog box appears, where you choose the align options you want.

You select the area with the Pick Rectangle tool or the Scissors tool.


Resizing a selected area

You can resize or move an area of an image you've selected. The Paint editor stretches or compresses the image inside the selection area accordingly. To resize an area, choose Options|Size. The Stretch Selection dialog box appears when you resize the image.

You select the area with the Pick Rectangle tool or the Scissors tool.


Storage Format dialog box overview
Storage Format dialog box

The Storage Format dialog box is where you choose the storage format for your resource.

Source button

The Source button creates your resource in script format.

Binary button

The Binary button creates your resource in binary format.


Source button

Select the Source button if you want to create your bitmap, cursor, font, or icon resource in source form as a resource script. Saving a resource as resource script puts it directly in your project file. This is usually how you'll save resources.

-	If you're creating an icon, you'll then see the New Icon Image dialog box. where you can specify characteristics of the icon.

-	If you're creating a bitmap, you'll see the New Bitmap Attributes dialog box. where you can specify characteristics of the bitmap.

-	If you're creating fonts or cursors, you're put in the Paint editor.


Binary button

Select the Binary button if you want to store your bitmap, cursor, font, or icon resource in a separate file that's referenced in your project file. Choose this option to share the resource across several projects or to make your resource compatible with the Microsoft Resource Compiler.

Resource Workshop displays the Add File To Project dialog box where you specify the file in which to store the resource. When you've made your selections, click OK.

-	If you're creating an icon, you'll then see the New Icon Image dialog box. where you can specify characteristics of the icon.

-	If you're creating a bitmap, you'll see the New Bitmap Attributes dialog box. where you can specify characteristics of the bitmap.

-	If you're creating fonts or cursors, you're put in the Paint editor.


Overview of icons
Icons

Icons are small bitmapped images, generally 32 x 32 or 32 x 16 pixels in size. Windows programs typically use customized icons to represent minimized windows.

To design icons, use the Resource Workshop Paint editor.

When working with icons, you perform four primary tasks. You

-	Start the Paint editor

-	Customize the icon

-	Test the icon

-	Save the icon


Starting the Paint editor for icons
Starting the Paint editor

To work on an icon, you need to start the Paint editor by creating an icon or editing one that already exists. You can also create a new image for an icon that already exists.

See Also

Icons


Creating an icon

To create a new icon,

1.	 Open a project.

2.	Choose Resource|New. Resource Workshop displays the New Resource dialog box.

3.	 In the Resource Type list box, scroll down to ICON and select it.

4.	Click OK to place the icon in the current project file.

5.	The Storage Format dialog box, where you choose the storage format for your icon is displayed.

After you've selected the storage format, you can double-click on the new image in the Icon window or select the new image and choose Images|Edit Image. You can now customize the icon.

See Also

Starting the Paint editor


Editing an icon

To edit an existing icon,

1.	 Open a project.

2.	Double-click the ICON entry you want to edit in the Project window, or select the ICON entry and choose Resource|Edit.

3.	If there's more than one image in the resource, the Icon window, where you can choose the image you want to edit is displayed.

Once you've selected the image, use the Paint editor tools to customize the icon.

In addition to creating and modifying icons directly with the Paint editor, you can also change the icon's resource script. It's unlikely that you'll want to do this because the script is almost entirely a series of hexadecimal values.

See Also

Starting the Paint editor


Creating a new image for an icon

You'll probably want to put different color formats of the same icon in one icon resource. These color variations on the same icon are called images.

The icon resource supports different color formats because Windows picks a color format based on the ability of the display hardware to support the format. Windows picks a 2-color format for a monochrome display driver and a 16-color format for the standard Windows VGA driver. Windows 3.0 doesn't fully support the 256-color version of an icon, even if your display hardware supports it. Your program must supply its own support for 256 colors.

Here's how to add a new image to an existing icon resource.

1.	 Open a project.

2.	Double-click the ICON entry you want to edit in the Project window, or select the ICON entry and choose Resource|Edit.

3.	Choose Images|New Image.

4.	Resource Workshop displays the New Icon Image dialog box, where you choose the image size and color format.

5.	Choose the same size as the existing image and a new color format and click OK.

6.	Double-click the new icon, or select it and choose Images|Edit Image. You'll see the Paint editor.

Typically, what you do next is open one of the existing icon images and copy it into the new (still blank) image. You might also have to customize the image if the colors are translated in a way that changes the form of the icon.

See Also

Starting the Paint editor


Copying an icon image
Copying an icon image to a new color format

To copy an icon image to a new color format,

1.	Create a new image for your icon.

2.	Open the image you want to copy in the Paint editor.

3.	Choose Edit|Select All to select the entire image.

4.	Choose Edit|Copy (or press Ctrl+Ins) to copy the icon image to the Clipboard.

5.	Use the Control|Close command to close the window.

5.	In the Icon window, double-click the new ICON entry.

6.	Choose Edit|Paste (or press Shift+Ins) to paste in the icon. It will be displayed in the new color.


Icon window

If there is more than one icon image in the selected resource, all the images are listed in the Icon window. Typically, multiple images represent different color formats of the same icon, such as a 2-color and a 16-color format.

To select an image,

1.	Find the icon image you want to edit.

2.	Double-click it, or select it and choose Images|Edit Image.

Resource Workshop displays the icon in the Paint editor.


Customizing an icon

After you have the icon open in the Paint editor, you can customize it. Before you begin working on your icon, you should zoom it. You can change the icon's transparent and inverted areas and its attributes. You can also delete icon resources and images.

As you're customizing your icon, you can see what it would look like on a CGA screen with the View|CGA Resolution[32 x 16] command.

Design considerations

Before you start, you should have an idea of what the icon represents to the user. The icon should be simple enough to fit into a 32 x 32 or 32 x 16 pixel area.

Think about where the user is most likely to display your icon-background colors and patterns can affect the icon's transparent and inverted areas.

Drop shading

Drop shading is a technique you can use to make your icon look three dimensional. For example, to make a black box look three dimensional, draw a gray border on the right side and bottom of the box.

See Also

Icons


Changing an icon's attributes

You can change an icon's attributes with the Icon|Size and Attributes command.

This command brings up the Icon Image Attributes dialog box, where you change an icon's size and color format.


Testing an icon

The easiest way to test an icon is to minimize the Paint editor window in which you're editing the icon, either by selecting the Minimize button in the top right corner of the window or choosing Icon|Test.

You can also bind the icon resource to an executable file and then run the file to see what the icon looks like.

Two primary reasons for testing an icon are

•	To see how a color icon looks in black and white when you move it around.

•	To see how transparent and inverted areas look against various backgrounds.

The first test is easy to perform: just minimize the window and move the icon around.

The second test takes a little more work. See the Testing transparent and inverted areas Help screen for more information.

See Also

Icons


Testing transparent and inverted areas of your icon
Testing transparent and inverted areas

Here's how can you test the transparent and inverted areas of your icon on various backgrounds.

1.	If necessary, reduce the size of Resource Workshop so it doesn't take up the entire screen, then move it to the bottom of the screen.

2.	Minimize the Paint editor window that contains the icon. Make sure the icon is visible and is in a spot where the Resource Workshop application workspace is its background.

3.	Change tasks to the Program Manager.

4.	Choose the Control Panel. When it appears, move it to the top of the screen.

5.	Choose Color.

6.	From the Colors dialog box choose Color Palette.

7.	Click in the area immediately surrounding the box with "Window Text" in it. You should see "Application Workspace" appear in the Screen Element box above the color palette.

8.	Click on a color, then click OK.

9.	Change tasks back to Resource Workshop and check the icon against the new background color.

At this point, you should be able to see both Resource Workshop and the Control  Panel dialog box at the same time. You can select another color by simply clicking on Colors in the Control Panel dialog box and performing steps 5 through 8.

Whenever you change the color of  the application workspace, Windows changes the color in the Resource Workshop window, where you can check the icon against the new color.

See Also

Testing an icon


Saving an icon

It's a good idea to save your icon as you go along, rather than waiting  for Resource Workshop to prompt you when you close the project.

There are two primary options you can use to save changes you've made to an icon resource. You can

•	Save the entire project

•	Save the icon resource as a file


Saving an icon resource as a file

If you just want to save an icon resource, you can choose Resource|Save Resource As to save the resource as a file.

You'll probably only do this step if you want to put the icon resource in binary format in a separate file for the first time. To save the resource as a file,

1.	Choose Resource|Save Resource As.

2.	Resource Workshop displays the Save File As dialog box. where you can enter a new file name or choose the  file name from the Files list.

3.	Click OK or press Enter.

4.	Resource Workshop asks you if you want the reference in the project file to refer to this external file from now on. Clicking Yes causes all future changes to the icon to be saved in binary format in the external icon file and not in the project file or in any previous icon file.

See Also

Saving an icon


Deleting icons and images
Deleting an icon resource or image

You can delete an icon resource or an icon image.

-	Deleting an icon resource deletes all the images in that resource.

-	Deleting an icon image gets rid of that single image in the icon resource.

See Also

Customizing icons


Deleting an icon resource

To delete an icon resource, select it in the Project window, then do one of the following:

-	Press the Del key or choose Edit|Delete to completely delete it.

-	Choose Edit|Cut to cut the resource into the Windows clipboard so you can paste it elsewhere.

See Also

Deleting an icon resource or image


Deleting an icon image

If you want to remove an image from an icon resource,

1.	Open the icon resource in Project window (double-click it or select it and choose Resource|Edit) to display the Icon window.

2.	Select the image entry you want to delete, then do one of the following:

-	Press the Del key or choose Edit|Delete to completely delete it.

-	Choose Edit|Cut to cut the image into the Clipboard so you can paste it elsewhere.

See Also

Deleting an icon resource or image


Editing the resource script of an icon

To work with the resource script for an icon, select the icon in the Project window and choose Resource|Edit As Text. Resource Workshop brings up the source script for the resource in its internal text editor.

The only readily comprehensible parts of an icon resource script are the first and second lines ("BEGIN" and the resource name) and the last line ("END"). Everything between the second line and the last line is hexadecimal code. If you like, you can edit this code to see the effect on the icon, but do so at your own risk.


Overview of cursors
Cursors

Cursors are bitmapped images 32 x 32 pixels in size that represent the current location on the screen. A Windows application often has a number of different cursors that represent different program functions.

Windows provides a set of standard cursors you can use in your programs. In addition, you can create your own customized cursors to represent different functions of the program.

To design your cursors, you use the Resource Workshop Paint editor.

When working with cursors, you perform four primary tasks. You

-	Start the Paint editor

-	Customize a cursor

-	Test the cursor

-	Save the cursor


Starting the Paint editor for cursors
Starting the Paint editor

To work on a cursor, you need to start the Paint editor by creating a cursor or editing one that already exists.

See Also

Cursors


Creating a cursor

To create a new cursor,

1.	 Open a project.

2.	Choose Resource|New. Resource Workshop displays the New Resource dialog box.

3.	 In the Resource Type list box, scroll down to CURSOR and select it.

4.	Click OK to place the cursor in the current project file.

5.	The Storage Format dialog box, where you choose the storage format for your cursor is displayed.

After you've selected the storage format, Resource Workshop opens the Paint editor where you can customize the new cursor resource.

See Also

Starting the Paint editor


Editing a cursor

To edit a cursor,

1.	 Open a project.

2.	Double-click the CURSOR entry you want to edit in the Project window, or select the CURSOR entry and choose Resource|Edit.

Once you've selected the cursor, use the Paint editor to customize the cursor.

In addition to creating and modifying cursors directly with the Paint editor, you can also change the cursor's resource script. It's unlikely that you'll want to do this because the script is almost entirely a series of hexadecimal values.

See Also

Starting the Paint editor


Customizing a cursor

After you have the cursor open in the Paint editor, you can customize it. Before you begin working on your cursor, you should zoom it. You can change the cursor's transparent and inverted areas. You can also delete cursors.

As you're customizing your cursor, you can see what it would look like on a CGA screen with the View|CGA Resolution [32 x 16] command.

Note that Resource Workshop creates only 32 x 32 pixel cursors. Even though you can see what the cursor would look in 32 x 16 format with the View|CGA Resolution [32 x 16] command, all you change is the view of the cursor: it's still a 32 x 32 cursor.

Design considerations

Before you start, you should have an idea of what your cursor is intended to represent. A typical use of a custom cursor is to represent the task the user is performing.

The hot spot is the cursor's active area, where the user clicks to activate the task represented by the cursor. You need to make the hot spot obvious.

Don't make the cursor complicated. It should be simple enough to fit into a 32 x 32 pixel area. Think about where the user is most likely to display your cursor. Background colors and patterns can affect the cursor's transparent and inverted areas.

See Also

Cursors


Setting the cursor's hot spot

An important consideration when you customize a cursor is where to put  the hot spot, the cursor's active area. The hot spot is the single pixel in the cursor that fixes the location when the user places the cursor and clicks to make a selection.

Here's how you set hot spots:

1.	Use the View|Zoom In command to zoom in on the cursor image until it's big enough to let you precisely choose the pixel coordinates for the hot spot.

2.	Display a grid on the zoomed image.

3.	Select the Line tool.

4.	Point to the location on the zoomed image where you want the hot spot and look at the coordinates displayed on the right side of the status line. Make a note of these coordinates.

5.	Choose Cursor|Set Hot Spot.

6.	In the Set Hot Spot dialog box enter the hot spot's pixel coordinates.

See Also

Customizing a cursor


Pixel coordinates

Pixel coordinates are in horizontal (x) and vertical (y) units. The upper left pixel of the cursor image is x=0 and y=0. The lower right pixel for a 32 x 32 cursor is x=31 and y=31, and for a 32 x 16 cursor  is x=31 and y=16.

Pixel coordinates are displayed on the right side of the Paint editor status line.


Deleting a cursor resource

To delete a cursor resource, select it in the Project window, then do one of the following:

-	Press the Del key or choose Edit|Delete to completely delete it.

-	Choose Edit|Cut to cut the resource into the Windows clipboard so you can paste it elsewhere.

See Also

Customizing a cursor


Testing a cursor

Anytime you want, you can test your cursor by choosing Cursor|Test.

Resource Workshop turns the current cursor into a test version of your cursor. You can move it around to see how it looks on different color backgrounds. When you finish testing, just click the mouse to get back to a real cursor.

See Also

Cursors


Saving a cursor

It's a good idea to save your cursor as you go along, rather than waiting for Resource Workshop to prompt you when you close the project.

There are two primary options you can use to save changes you've made to a cursor resource. You can

-	Save the cursor resource as a file

-	Save the entire project

See Also

Cursors


Saving a cursor resource as a file

If you just want to save the cursor resource, you can choose Resource|Save Resource As to save the resource as a file.

You'll probably only do this step if you want to put the cursor resource in binary format in a separate file for the first time. To save the resource as  a file,

1.	Choose Resource|Save Resource As.

2.	Resource Workshop displays the Save File As dialog box. where you can enter a new file name or choose the  file name from the Files list.

3.	Click OK or press Enter.

4.	Resource Workshop asks you if you want the reference in the project file to refer to this external file from now on. Clicking Yes causes all future changes to the cursor to be saved in binary format in the external cursor file and not in the project file or in any previous cursor file.

See Also

Saving a cursor


Editing the resource script of a cursor

In addition to creating and modifying cursors directly with the Paint editor, you can also work with the cursor's resource script,

To work with the resource script for a cursor, select the cursor resource in the Project window by clicking it. Then choose Resource|Edit As Text. Resource Workshop brings up the source script for the resource in its internal text editor.

The only readily comprehensible parts of a cursor resource script are the first and second lines ("BEGIN" and the resource name) and the last line ("END"). Everything between the second line and the last line is hexadecimal code. If you like, you can edit this code to see the effect on the cursor, but do so at your own risk.

See Also

Cursors


Overview of bitmaps
Bitmaps

Bitmap resources display graphic images in your Windows program. Windows uses bitmaps to represent scroll bar arrows, the Minimize and Maximize buttons, and so on.

To create bitmaps, you use the Resource Workshop Paint editor.

When working with bitmaps, you perform four primary tasks. You

-	Start the Paint editor

−	Customize the bitmap

−	Test the bitmap

-	Save the bitmap


Starting the Paint editor for bitmaps
Starting the Paint editor

To work on a bitmap, you need to start the Paint editor by creating a bitmap or editing a bitmap that already exists.

See Also

Bitmaps


Creating a bitmap

To create a new bitmap,

1.	 Open a project.

2.	Choose Resource|New. Resource Workshop displays the New Resource dialog box.

3.	 In the Resource Type list box, scroll down to BITMAP and select it.

4.	Click OK to place the bitmap in the current project file.

5.	The Storage Format dialog box, where you choose the storage format for your bitmap is displayed.

After you've selected the storage format, Resource Workshop opens the Paint editor, where you can customize the new bitmap resource.

See Also

Starting the Paint editor


Editing a bitmap

To edit a bitmap,

1.	 Open a project.

2	 Double-click the BITMAP entry you want to edit in the Project window, or select the BITMAP entry and choose Resource|Edit.

Once you've selected the image, use the Paint editor tools to customize the bitmap.

In addition to creating and modifying bitmaps directly with the Paint editor, you can also change the bitmap's resource script. It's unlikely that you'll want to do this because the script is almost entirely a series of hexadecimal values.

See Also

Starting the Paint editor


Customizing a bitmap

After you have the bitmap open in the Paint editor, you can customize it. Before you begin working on your bitmap, you should zoom it.

You can choose the bitmap's foreground and background colors, as well as change its attributes. You can also delete bitmap resources.

You can't, however, add transparent and inverted areas to your bitmap.

See Also

Bitmaps


Changing a bitmap's attributes

You can change a bitmap's attributes with the Bitmap|Size and Attributes command.

This command brings up the Set Bitmap Attributes dialog box, where you choose:

−	the bitmap image size

-	whether the image you've already drawn will shrink or stretch if you change the overall image size

-	the number of colors used in the image

-	how the bitmap should be stored


Deleting a bitmap resource

To delete a bitmap resource, select it in the Project window, then do one of the following:

-	Press the Del key or choose Edit|Delete to completely delete it.

-	Choose Edit|Cut to cut the resource into the Windows clipboard so you can paste it elsewhere.

See Also

Customizing a bitmap


Saving a bitmap

It's a good idea to save your bitmap as you go along, rather than waiting for Resource Workshop to prompt you when you close the project.

There are two primary options you can use to save changes you've made to a bitmap resource. You can

-	Save the bitmap resource as a file

−	Save the entire project

See Also

Bitmaps


Saving a bitmap resource as a file
Saving the bitmap resource as a file

If you just want to save the bitmap resource, you can choose Resource|Save Resource As to save the resource as a file.

You'll probably only do this step if you want to put the bitmap resource in binary format in a separate file for the first time. To save the resource as a file,

1.	Choose Resource|Save Resource As.

2.	Resource Workshop displays the Save File As dialog box. where you can enter a new file name or choose the  file name from the Files list.

3.	Click OK or press Enter.

4.	Resource Workshop asks you if you want the reference in the project file to refer to this external file from now on. Clicking Yes causes all future changes to the bitmap to be saved in binary format in the external bitmap file and not in the project file or in any previous bitmap file.


Testing a bitmap

To test your bitmap, you'll need to compile the bitmap resource and bind it to an executable file. Then you can run the executable file to see what the bitmap looks like.


Editing the resource script of a bitmap

In addition to creating and modifying bitmaps directly with the Paint editor, you can also work with the bitmap's resource script.

To work with the resource script for a bitmap, select the bitmap from the Project window by clicking it. Then choose Resource|Edit As Text. Resource Workshop brings up the source script for the resource in its internal text editor.

The only readily comprehensible parts of a bitmap resource script are the first and second lines ("BEGIN" and the resource name) and the last line ("END"). Everything between the second line and the last line is hexadecimal code. If you like, you can edit this code to see the effect on the bitmap, but do so at your own risk.

See Also

Bitmaps


New Bitmap Attributes dialog box (overview)
New Bitmap Attributes dialog box

The New Bitmap Attributes dialog box is where you choose the size and color format for a new image.

Size input boxes

The Size input boxes are where you choose the size of your bitmap.

Colors radio buttons

The Colors radio buttons determine the number of colors in the image.


Overview of fonts
Fonts

A font is a collection of data used by a computer to draw individual characters on an output device. The font contains data that describes that overall collection. It also contains information the computer needs to draw each character.

Types of fonts

Windows supports two basic types of fonts: raster fonts and outline fonts.

-	Raster fonts contain a bitmapped image of each character.

-	Outline fonts contain a series of drawing commands for each character.

Resource Workshop creates and edits raster fonts only.

Resource Workshop fonts

Typically, you'll use Resource Workshop to create picture fonts: small bitmaps that you want to group together. Although you could create a picture as a bitmap image, picture fonts and bitmaps aren't interchangeable. They differ in the way images are stored and retrieved at runtime.

When working with a font resource, you perform five primary tasks. You

-	Start the Paint editor

-	Customize a font resource

-	Save a font resource

-	Add a font resource to your application

−	Test a font resource


Differences between font and bitmap resources

There are a couple of reasons why you might want to define images as part of a font resource instead of a bitmap image:

−	It's simpler to write Windows code to load a font into memory and paint it. Loading and painting the same image that's stored as a bitmap is more complex.

-	A font resource can contain a large number of images. When you need a series of bitmap images,  you can create them as part of a single font resource, rather than in separate bitmap resources. Then at runtime, you'll only need to load a single resource.

-	A font resource has more memory overhead than a bitmap resource. Each time you load a font into memory, Windows also loads the font header.


Starting the Paint editor for fonts
Starting the Paint editor

To work with a font resource, you need to start the Paint editor by creating a font or editing one that already exists.

When you work with a font, you'll see a status line at the top of the screen. The images in the font resource are displayed in the scroll bar on the right side of the Paint editor screen.

See Also

Fonts


Status line (Fonts)
Status line

The status line across the top of the font image displays:

-	the face name assigned to the font on the left

-	the current character you're editing on the right


Status line: face name

The name you've assigned to the font is displayed on the left side of the status line.

You use the Face Name input box of the Font Header Information dialog box. to assign the face name.


Status line:current character

The current character you're working on is displayed on the right side of the status line.

You use the Character input boxes in the Font Size Information dialog box. to map font images to the ASNI character set.


Scroll bar

The images in the font resource are displayed on the right side of the Paint editor screen.

Scroll through the images and click the one you want to edit.


Creating a font resource

To create a new font resource,

1.	 Open a project.

2.	Choose Resource|New. Resource Workshop displays the New Resource dialog box.

3.	 In the Resource Type list box, scroll down to FONT and select it.

4.	Click OK to place the font in the current project file.

5.	The Storage Format dialog box, where you choose the storage format for your icon is displayed .

After you've selected the storage format, you're put in the Paint editor, where you can customize the font.

See Also

Starting the Paint editor


Editing a font resource

To edit an existing font resource,

1.	 Open a project.

2.	Double-click the FONT entry you want to edit in the Project window or select the FONT entry and choose Resource|Edit. Each FONT entry in the Project window represents one font resource, though a single font can contain many images.

Once you've selected the image, use the Paint editor to customize the font.

In addition to creating and modifying bitmaps directly with the Paint editor, you can also change the font's resource script. It's unlikely that you'll want to do this because the script is almost entirely a series of hexadecimal values.

See Also

Starting the Paint editor


Customizing a font resource

After you have the font resource open in the Paint editor, you can customize it. Before you begin working on your font, you should zoom it.

You can define the font's character set, create a variable-width font, and define the font header.

You can also delete a single font image from the font resource or delete the entire resource.

By default, the Paint editor loads the first font image it finds in the font resource. To work on other fonts, you can click on any of the font images on the right side of the Paint editor.

See Also

Fonts


Defining the font's character set

When you create a new font resource, it includes only one 8 x 8 pixel image. Usually you'll want more than one image in your font resource. You also might want to specify a different size for your font images.

To specify more than one image in a font resource and to change the size of font images, choose Font|Font Size. You'll see the Font Size Information dialog box.

See Also

Customizing a font resource


Creating variable-width fonts
Creating a variable-width font

When you create a font resource, you can choose whether you want all the images in the font to be the same width or varying widths.

If you're using a font resource to define a picture font that isn't really based on a character set, you may or may not want all the images to be the same width.

To create a variable-width font,

1.	Choose Font|Font Size. You'll see the Font Size Information dialog box.

2.	Enter 0 (a zero) in the Width input box.

3.	Enter the maximum width, in pixels, for the images in the font resource in the Maximum Width input box. Click OK to save your selections.

4.	Choose Font|Character Width. You'll see the Character Width dialog box, where you can adjust the character width size.

See Also

Customizing a font resource


Defining a header for a font resource

Every font resource includes a header that describes general information about the font, such as typeface name and copyright information. If you're defining a font resource that consists of alphabetic characters, the header defines type style and size for all characters in the font.

To define the header for a font, choose Font|Header. You'll see the Font Header Information dialog box.

See Also

Customizing a font resource


Deleting a font image or resource

You can delete a font image or a font resource.

-	Deleting a font image gets rid of that single image in the font resource.

-	Deleting a font resource deletes all the images in that resource.

See Also

Customizing a font resource


Deleting a font resource

To delete a font resource, select it in the Project window, then do one of the following:

-	Press the Del key or choose Edit|Delete to completely delete it.

-	Choose Edit|Cut to cut the resource into the Windows clipboard so you can paste it elsewhere.

See Also

Deleting a font image or resource


Deleting a font image

If you want to remove an image from a font resource,

1.	Open the font resource in Paint editor.

2.	Click the image you want to delete. (Images are displayed on the right side of the Paint editor screen.)

-	Press the Del key or choose Edit|Delete to completely delete the image.

− 	Choose Edit|Cut to cut the image into the Clipboard so you can paste it elsewhere.

See Also

Deleting a font image or resource


Saving a font resource

It's a good idea to save your font images as you go along, rather than waiting for Resource Workshop to prompt you when you close the project.

There are two primary options you can use to save changes you've made to a font resource. You can

-	Save the entire project

− 	Save the font resource as a file

See Also

Fonts


Saving a font resource as a file

If you just want to save a font resource, you can choose Resource|Save Resource As to save the resource as a file.

You'll probably only do this step if you want to put the font resource in binary format in a separate file for the first time. To save the resource as a file,

1.	Choose Resource|Save Resource As.

2.	Resource Workshop displays the Save File As dialog box. where you can enter a new file name or choose the  file name from the Files list.

3.	Click OK or press Enter.

4.	Resource Workshop asks you if you want the reference in the project file to refer to this external file from now on. Clicking Yes causes all future changes to the font to be saved in binary format in the external font file and not in the project file or in any previous font file.

See Also

Saving a font


Adding font resources to your application

Although Resource Workshop stores your fonts in your project file or a .FNT file, you'll also need to create a .FON file when you add the font resource to your application.

You can do this using Pascal or C.

See Also

Fonts


Creating a .FON file with Pascal

Before you create a .FON file, save the project file as a resource object (.RES) file. Use the Resource|Save Resource As command.

To create a .FON file, write a Pascal program that creates a resource-only dynamic link library. Then, rename the .DLL file to a .FON file at the DOS command line.

See Also

Adding font resources to your application


Creating a .FON file with C

Before you create a .FON file, save the project file as a resource object (.RES) file. Use the Resource|Save Resource As command.

Here's how to create a sample .FON file.

1.	Write and compile this C++ program.

#include "windows.h"

#pragma warn -par  // Don't warn about unused parameters

int FAR PASCAL LibMain (HANDLE hInstance, WORD wDataSeg,WORD

wHeapSize, LPSTR lpszCmdLine)

{

  if (wHeapSize > 0)

      UnlockData(0);

  return 1;

}

#pragma war .par  // Warn about unused parameters

2.	Create a module definition file.

3.	Create a make file and execute it.

See Also

Adding font resources to your application


Testing a font
Testing a font resource

To test your font resource, you'll need to compile the font resource and bind it to an executable file. You can then run the executable file to see what the font looks like.

See Also

Fonts


Editing the resource script of a font

In addition to creating and modifying fonts directly with the Paint editor, you can also work with the font's resource script.

To work with the resource script for a font, select the font from the Project window by clicking it. Then choose Resource|Edit As Text. Resource Workshop brings up the source script for the resource in its internal text editor.

The only readily comprehensible parts of a font resource script are the first and second lines ("BEGIN" and the resource name) and the last line ("END"). Everything between the second line and the last line is hexadecimal code. If you like, you can edit this code to see the effect on the font, but do so at your own risk.

See Also

Fonts


Overview of user-defined resources
User-defined resources

In addition to defining standard resource types, you can also define your own resource types. After you create a new resource type, you can add any number of user-defined resources of this type to your project.

When you create user-defined resource types, you can store data as part of the resource definition in a project file or as a separate file. You can also use the RCDATA resource type to add data to your application.

Before you work with user-defined resources, you should determine if you even need to create one.

When working with user-defined resources, you perform five primary tasks. You

-	Create a user-defined resource type

-	Add a user-defined resource to the resource type

-	Edit a user-defined resource

-	Test the user-defined resource

-	Save the user-defined resource


When to create user-defined resources

User-defined resources can contain data that doesn't fit into one of the standard resource types. For example, if you want to create a character string resource that's longer than the STRINGTABLE limit of 255 characters, you can define your own resource type and store your character strings there.

Metafiles

You can also include metafiles in your project as user-defined resources. A metafile is a type of bitmap (in source form, it's a collection of Graphics Device Interface (GDI) calls) that's not only easier to scale and more device independent than the standard Bitmap resource, but also often takes up less storage space than a Bitmap resource.


Creating a user-defined resource type

Before you add user-defined resource data to your project, you must first create a type for it.

Here's how:

1.	 Open a project.

2.	Choose Resource|New. Resource Workshop displays the New Resource dialog box.

3.	Choose the New Type button.

4.	In the New Resource Type dialog box, enter a name for the resource type you're creating. For example, if you're creating a resource to contain a large block of text, you could name your new resource type TEXT. Once you've entered the name, click OK.

5.	If your project is an .RC file, Resource Workshop asks you if want to create an identifier for the new resource type. Click OK.

6.	Enter a value for identifier in the New Identifier dialog box. This value is the ID that Windows and your program will associate with this identifier type. Click OK.

7.	Click OK again when the New Resource dialog box is displayed.

From now on, whenever you create a new resource, you'll see that resource type listed in the New Resource dialog box with all the standard resource types.

See Also

User-defined resources

Using the RCDATA resource type


Using the RCDATA resource type

You can use the predefined RCDATA resource type to add a data resource to your application. It works the same as a user-defined resource type. The primary difference between the two is addressability: you might prefer to have many different types of user-defined resources rather than just one type, RCDATA.

If you do use an RCDATA resource, add it to the project by choosing Resource|New and adding a new resource whose type is RCDATA. You'll see a blank RCDATA definition in the text editor,. You can then add data..

See Also

Creating a user-defined resource type


Adding a user-defined resource to the resource type

After you create a resource type, you can add a resource of that type to your project.

Here's how:

1.	 Open a project.

2.	Choose Resource|New. Resource Workshop displays the New Resource dialog box. Choose your user-defined resource type.

3.	Click OK.

4.	After you click OK, Resource Workshop opens the text editor with a blank definition for your user-defined resource. At this point, you can edit your resource.

You can also use the Add File To Project dialog box to add a user-defined resource to your resource type.

See Also

Creating a user-defined resource type


Editing a user-defined resource

When you edit a user-defined resource, you work with its resource script.

To edit a user-defined resource,

1.	 Open a project. You can either create a resource type or open an already existing one in the Project window.

2.	Select the user-defined resource type to which you want to add a resource.

3.	Open the text editor by:

-	Double-clicking the name of the resource you want to edit.

-	Selecting the resource name and choosing Resource|Edit or Resource|Edit as Text.

Once you've brought the resource script up in the text editor, you can add data or change data.

You can also delete user-defined resources.

See Also

User-defined resources


Adding data to your resource

To add data to a user-defined resource's source script:

-	Use the text editor to enter data between the BEGIN and END statements that define your data.

-	Store the data in a separate file and add the file name to the end of the user-defined resource statement. Delete the BEGIN and END statements.

After you make any changes, you must recompile the resource to save your changes. If you exit without recompiling, you lose all your changes.

See Also

Editing a user-defined resource


Changing resource data

Use the text editor to change data that's between the BEGIN and END statements.

Here are some guidelines:

-	The data can include any mix of numeric values and strings.

-	You can use hexadecimal, octal, or decimal notation to represent numeric values.

-	If you include text strings in your resource, enclose the strings in quotation marks, like this: "string". Strings aren't automatically null terminated. To terminate a string with a null character, type \0 (backslash zero) at the end of the string.

See Also

Editing a user-defined resource


Hexadecimal values

Use either 0x (a zero followed by the letter x) or $ (a dollar sign) as the leading characters for hexadecimal notation. This notation supports only 16-bit values. If you want to use an odd number of hexadecimal values, use a hexstring.

A hexstring is a string of hexadecimal values enclosed in single quotation marks. The compiler ignores any spaces you insert to make the hex codes more readable.


Octal values

Use 0o (a zero followed by the letter o) or just 0 (zero) as the leading characters for octal notation.


Adding resource data that's stored in a separate file

If the data is stored in a separate file, you can use an external text editor to edit the file. To add a reference to the data file to the resource script,

1.	Type the complete path name of the file after the name of the resource type.

2.	Delete the BEGIN and END statements.

You can also use the Add To Project dialog box:

1.	Choose File|Add To Project to display the Add To Project dialog box.

2.	Choose "User Resource Data" in the File Type list.

3.	Enter the file name in the File Name input box. (The file must use a non-standard file extension.)

4.	The Custom Resource dialog box is displayed.

5.	Click OK.

See Also

Editing a user-defined resource


Testing a user-defined resource

You can't test user-defined resources within Resource Workshop. You need to use Resource Workshop to compile the project file that contains the resource and bind it to your  executable file. You can then run your program and test the resource.

See Also

User-defined resources


Deleting a user-defined resource

To delete a user-defined resource, select it in the Project window, then do one of the following:

- 	Press the Del key or choose Edit|Delete to completely delete it.

 -	Choose Edit|Cut to cut the resource into the Windows clipboard so you can paste it elsewhere.

See Also

Editing a user-defined resource


Saving a user-defined resource

It's a good idea to save your resource as you go along, rather than waiting  for Resource Workshop to prompt you when you close the project.

There are two primary options you can use to save changes you've made to a user-defined resource. You can

-	Save the entire project

-	Save the user-defined resource as a file

See Also

User-defined resources


Saving a user-defined resource as a file

If you just want to save a user-defined resource, you can choose Resource|Save Resource As to save the resource as a file.

To save the resource as a file,

1.	Choose Resource|Save Resource As.

2.	Resource Workshop displays the Save File As dialog box. where you can enter a new file name or choose the  file name from the Files list.

3.	Click OK or press Enter.

Resource Workshop asks you if you want the reference in the project file to refer to this external file from now on. Clicking Yes causes all future changes to the user-defined resource to be saved in the external file and not in the project file or in any previous user-defined resource file.

See Also

Saving a user-defined resource


Overview of the Resource Script Language
Resource Script Language

Description

When you use Resource Workshop to create your resources, Resource Workshop builds a resource script file in your project window. Most of the time, you needn't worry about learning this resource script language. Occasionally, however, you might want to edit a resource script with a text editor.

Each resource script statement specifies a resource to be included in your executable file. You can list the primary statements in any order you choose; there is no "program flow" in a resource script file, although you must follow the syntax given for each statement carefully.

Example

Here's a resource script example that consists of three statements:

-	one that specifies a cursor

-	another that specifies the main menu of the application

−	one that specifies an icon

pencil CURSOR MOVEABLE pencil.cur

mainmenu MENU PRELOAD

BEGIN

  POPUP "&File"

  BEGIN

    MENUITEM "&New", 100

    MENUITEM "&Open", 101

    MENUITEM "&Close", 102, GRAYED

    MENUITEM "&Save", 103

    MENUITEM "Save &As", 104

    MENUITEM SEPARATOR

    MENUITEM "&Print", 105

    MENUITEM "&Draft Printing", 107, CHECKED

    MENUITEM SEPARATOR

    MENUITEM "E&xit", 106

  END

  MENUITEM "&Help", 200

END

myicon ICON PRELOAD MOVEABLE myicon.ico

See Also

Alphabetical listing of Resource Script Language elements

Functional listing of Resource Script Language elements


Alphabetical listing of the Resource Script Language elements

Here's an alphabetical listing of all the elements of the Resource Script Language.

For a functional listing, go the Functional listing of Resource Script Language elements Help screen.

For an overview of the language, go to the Resource Script  Language Help screen.

#define

#elif

#else

#endif

#error

#ifdef

#if

#ifndef

#include

#line

#pragma

ACCELERATORS

Binary resource statement

BITMAP

BUTTON class style constants

CHECKBOX

COMBOBOX

COMBOBOX class style constants

Constants

CONTROL

CTEXT

CURSOR

DEFPUSHBUTTON

DIALOG

Dialog window style constants

Directives

EDIT class style constants

EDITTEXT

FONT

GROUPBOX

ICON

LISTBOX

LISTBOX class style constants

LTEXT

MENU

MENUITEM

Multiple-line statements

POPUP

PUSHBUTTON

RADIOBUTTON

RCDATA

RCINCLUDE

RTEXT

SCROLLBAR

SCROLLBAR class style constants

STATIC class style constants

STRINGTABLE

User-defined resources

VERSIONINFO

Window style constants


Functional listing of the Resource Script Language elements

Here's a functional listing of all the elements of the Resource Script Language.

For an alphabetical listing, go the Alphabetical listing of Resource Script Language elements Help screen.

For an overview of the language, go to the Resource Script  Language Help screen.

Constants

Dialogs

CHECKBOX

COMBOBOX

CONTROL

CTEXT

DEFPUSHBUTTON

EDITTEXT

FONT

GROUPBOX

ICON

LISTBOX

LTEXT

PUSHBUTTON

RADIOBUTTON

RTEXT

SCROLLBAR

Directives

#define

#elif

#else

#endif

#error

#ifdef

#if

#ifndef

#include

#line

#pragma

RCINCLUDE

Menus

MENUITEM

POPUP

Statements, binary resource

BITMAP

CURSOR

FONT

ICON

Statements, multiple-line

ACCELERATORS

DIALOG

MENU

RCDATA

STRINGTABLE

User-defined resources

Version stamping

VERSIONINFO


Binary resources statement
Binary resource statement

Binary resource statements identify a resource and name the file where the resource can be found.

For example,

pencil CURSOR MOVEABLE pencil.cur

names the resource "pencil" and identifies it as a CURSOR resource located in the file PENCIL.CUR.

The syntax of all binary resources statements looks like this:

resource-name resource-type [load-type] [memory-option] filename

Binary resource statements specify bitmaps, cursors, fonts, icons. Each statement has its own syntax. The binary resources statements are

BITMAP

CURSOR

FONT

ICON

See Also

Multiple-line statements


Multiple-line statements

Multiple-line statements are generally more complex than binary resources statements. They specify the contents of a resource.

Here's an example of a multiple-line statement for a menu resource:

mainmenu MENU PRELOAD

BEGIN

  POPUP "&File"

  BEGIN

    MENUITEM "&New", 100

    MENUITEM "&Open", 101

    MENUITEM "&Close", 102, GRAYED

    MENUITEM "&Save", 103

    MENUITEM "Save &As", 104

    MENUITEM SEPARATOR

    MENUITEM "&Print", 105

    MENUITEM "&Draft Printing", 107, CHECKED

    MENUITEM SEPARATOR

    MENUITEM "E&xit", 106

  END

    MENUITEM "&Help", 200

END

This example specifies the main menu of an application. On the main menu are two options: File and Help.

File is a pop-up menu (commonly known as a drop-down menu) with several options, each defined with a MENUITEM substatement contained within the BEGIN and END keywords. This is characteristic of all multiple-line statements. Like other multiple-line statements, this statement permits you to include multiple substatements between the words BEGIN and END.

Multiple-line statements specify accelerators, string resources, raw data resources, dialog boxes, and menus. Each statement has its own syntax. The multiple-line statements are

ACCELERATORS

DIALOG

MENU

RCDATA

STRINGTABLE


Directives

Directive statements are special statements that affect how the resource script file is compiled. They do not define resources. Unlike other resource script statements, directives are case sensitive.

You can use directives to assign values to names you use in other resource script statements, include the contents of other files, and specify how the script file should be compiled.

If you are a C or C++ programmer, the directive statements will look very familiar to you. They are identical to those you use when compiling your programs.

Here are the directives:

Directive	Description

#define	Assigns a given value to the name you specify.

#elif	Controls conditional compilation and marks an optional block. Used with #if.

#else	Controls conditional compilation and marks an optional block. Used with #if, #ifdef, #ifndef, and #elif.

#endif	Controls conditional compilation and  marks end of a block. Used with #if, #ifdef, #ifndef, and #elif.

#error	Displays user-defined error message.

#if	Marks the start of conditional compilation.

#ifdef	Marks the start of conditional compilation if a specified name has been #defined.

#ifndef	Marks the start of conditional compilation if a specified name has not been #defined.

#include	Puts the contents of the named file into your resource script before it's compiled.

#line	Ignores text on specified line number.

#pragma	Directive is ignored.

RCINCLUDE	Puts the contents of the named file into your resource script before it's compiled.


#define directive

Description

A directive that causes the compiler to substitute text for each subsequent reference to identifier in the resource source text.

Syntax

#define identifier text

Syntax Elements

identifier 	Only recognized and replaced by the compiler when it is followed by whitespace, and occurs outside a quoted string.

text	Can contain any valid characters. Is normally terminated by the end of the line on which the #define occurs. The text can also be empty. To continue the text onto another line, place a backslash character (\) at the end of the source line.

Remarks

Both the #define directive and the identifier are case sensitive.

There are two #define identifiers that are always defined in Resource Workshop:

RC_INVOKED

WORKSHOP_INVOKED

Testing for these values in an #if or #ifdef directive always yields 1.

Parameterized #define directives that use the syntax #define(parameter-list) are not supported by Resource Workshop and can't be referenced. However, #define directives of this type can be included in .H files as long as they are not referenced.

The #define directive is a subset of the #define statement.

Example

After you compile this example, SelectAll and IDS_SAMPLE have the value 1. IDS_ERROR has the value 2.

#define SelectAll  1

#define IDS_SAMPLE 1

#define IDS_ERROR  IDS_SAMPLE + 1

#define MYCAPTION  "hello"

See Also

Identifier files


#elif

Description

A directive that is used in conjunction with the #if directive to control conditional compilation.

Syntax

#elif constant-expression

Syntax Elements

constant-expression	Evaluated as a signed long integer. If constant-expression evaluates to a nonzero value, the text following the #elif directive is processed by the compiler. Otherwise, the text between the #elif and a following #elif or #endif directive is ignored by the compiler.

Remarks

Conditional compilation directives that occur within a text resource are lost if that resource is edited by Resource Workshop.

The #elif keyword is case sensitive; #ELIF causes a compile error.

Example

This example causes #define A to have the value 2.

#if (1 == 0)

#define A 1

#elif (1 == 1)

#define A 2

#endif


#else

Description

A directive that is used in conjunction with the #if, #ifdef, #ifndef, and #elif directives to control conditional compilation.

Syntax

#else

Remarks

The compiler processes source code following the #else directive until the next #endif directive only when none of the previous conditional directives within the current scope have been processed.

If any previous conditional directives within the current scope have been processed, the source code between the #else and the following #endif will be ignored.

Conditional compilation directives that occur within a text resource are lost if that resource is edited by Resource Workshop.

The #else keyword is case sensitive; #ELSE causes a compile error.

Example

This example causes #define A to have the value 3.

#if (1 == 0)

#define A 1

#elif (1 == 3)

#define A 2

#else

#define A 3

#endif


#endif

Description

A directive that marks the end of the scope of the current conditional compilation.

Syntax

#endif

Remarks

The #endif directive is used in conjunction with the #if, #ifdef, #ifndef, #else, and #elif directives to control conditional compilation.

Note that conditional compilation directives that occur within a text resource are lost if that resource is edited by Resource Workshop.

The #endif keyword is case sensitive; #ENDIF will cause a compile error.

Example

#if (1==0)

#define A 1

#elif (1==1)

#define A 2

#endif


#error

Description

A directive that displays a user-defined error message.

Syntax

Error: filename line# : #error directive encountered: error text

Remarks

This directive usually catches an undesired compile-time condition. In the normal case, the condition would be false. If the condition is true, you want the compiler to print an error message and stop the compile You do this by placing an #error directive in a conditional that is true for the undesired case.


#if

Description

A directive that marks the start of conditional compilation.

Syntax

#if constant expression

#if [!]defined identifier

#if [!]defined (identifier)

Syntax Elements

When followed by a constant expression, the constant expression is evaluated as a signed long integer.

-	If the resulting value is nonzero, the source text following the #if directive until the next #else, #elif, or #endif directive is processed by the compiler.

-	 If the resulting value is zero, the source text following the #if directive until the next #else, #elif, or #endif directive is ignored by the compiler.

The other formats of the #if directive can be used in place of the #ifdef and #ifndef directives. The keyword defined must be lowercase, but it can be preceded by a ! operator. The following identifier (optionally surrounded by parentheses) is searched for in the compiler's table of #defines. If the #define is found, the source text following the #if directive is processed. The ! operator reverses the effect of the preceding test.

Remarks

#if directives can be nested. Note that conditional compilation directives that occur within a text resource are lost if that resource is edited by Resource Workshop.

The #if keyword is case sensitive; thus, #IF will cause a compile error.

Example

After you compile this example, neither A nor B will be defined.

#if (1 == 0)

#define A 1

#endif

#if defined A

#define B 2

#endif


#ifdef

Description

A directive that marks the start of conditional compilation.

Syntax

#ifdef identifier

Format

identifier	Searched for in the compiler's table of #defines.

-	If the identifier is found,  the source text following the #ifdef directive until the next #else, #elif, or #endif is processed.

-	If the identifier is not found, the source text following the #ifdef directive until the next else, #elif, or #endif is ignored.

Remarks

The #ifdef keyword is case sensitive; #IFDEF will cause a compile error.

Example

The #define NOATOM will be defined after you compile this example.

#define RC_INVOKED

#ifdef  RC_INVOKED

#define NOATOM

#endif


#ifndef

Description

A directive that marks the start of conditional compilation.

Syntax

#ifndef identifier

Syntax Elements

identifier	Searched for in the compiler's table of #defines.

-	If the identifier is found, the source text following the #ifndef directive until the next #else, #elif, or #endif is ignored.

-	If the identifier is not found, the source text following the #ifdef directive until the next #else, #elif, or #endif is processed.

Remarks

The #ifndef keyword is case sensitive; thus, #IFNDEF will cause a compile error.

Example

After you compile this example, the file WINDOWS.H will not be included by Resource Workshop.

#ifndef  WORKSHOP_INVOKED

#include <windows.h>

#endif


#include

Description

A directive that causes the Resource Workshop compiler to open the named source file and process directives and resource definitions contained in that file.

Syntax

#include "filename"

#include <filename>

Parameters

filename	Can be absolute, relative to the current directory, or in one of the directories identified by the INCLUDE environment variable.

filename	Must be surrounded by either a pair of double-quote characters ("") or a left angle bracket (<) and a right angle bracket (>). Unlike C language preprocessors, Resource Workshop treats both forms identically, to maintain compatibility with the Microsoft RC compiler. Also to maintain compatibility, paired backslash characters ("\\") are treated as a single backslash.

Remarks

Only directives of the format #... are processed in a header or C source file that is #included. All other data (for example, comments, structure definitions, code, resource definitions) within #included files are ignored.

This prevents Resource Workshop from seeing or processing RCINCLUDE directives in an #included file in header and C source files.

You can also #include Pascal constants in a Pascal Include file or in a unit. The file must not contain any data other than constants.

The #include keyword is case sensitive; #INCLUDE will cause a compile error.

Example

These examples show you how to #include C identifiers:

#include "w3demo.h"

#include <project.h>

These examples show you how to #include Pascal identifiers:

#include "MYCONSTS.INC"

#include <PROJECT.PAS>


#line

Description

A directive that causes the Resource Workshop compiler to ignore text on the specified line.

Syntax

#line integer_constant


#pragma

Description

A directive that is ignored by the Resource Workshop compiler.


ACCELERATORS

Description

A multiple-line statement that defines keyboard shortcuts for menu items and other program control actions.

Syntax

resource-name ACCELERATORS

BEGIN

  keystroke, acc-ID, [keystroke-type] [modifier key] [NOINVERT]

END

Syntax Elements

resource-name	Text name or numeric ID for this resource. The name or number must be unique for accelerators. Numeric IDs must be positive integers.

keystroke+	Value of the character code that activates this accelerator. The field can be either a character in double quotes or a numeric value.

 If a character in quotes is used, it can be proceeded by a carat (^) to indicate that it is a control character (for example "^a" indicates Ctrl-A).

If a numeric value is used, it is either the ASCII value of the accelerator key or the value for a virtual key, depending on the keystroke-type.

acc-ID	User-assigned integer value that identifies the string. Uniqueness is not required of IDs: Two different key combinations can be used to invoke the same command. The ID is sent in the wParam of a WM_COMMAND message. The high-order word of the lParam of the WM_COMMAND message is set to 1 to indicate the message resulted from an accelerator key.

keystroke-type	Valid only if the keystroke field contains a numeric value. In such cases, this field indicates whether the keystroke number is an ASCII value or virtual key value as follows:

ASCII	Keystroke field is ASCII value.

VIRTKEY	Keystroke field is virtual key value.

modifier-key	Indicates if any modifier keys must be held down while typing the keystroke to activate the accelerator. If this field is missing, no modifier keys are required. Valid modifier keys are Shift, Alt, and Ctrl. The SHIFT and CTRL modifiers have no effect unless the VIRTKEY keystroke-type is used.

SHIFT	Shift key must be held down.

CONTROL	Ctrl key must be held down.

ALT	Alt key must be held down.

NOINVERT	Disables highlighting of the menu title of the accelerated menu item when using accelerator keys for actions which have no menu item equivalent. If the NOINVERT field is missing, these menu titles are highlighted.

Remarks

The accelerator resource associates one or more accelerator keys with a corresponding accelerator command ID (acc-ID). Although acc-IDs must be numeric, the #define can be used to simplify access by the program.

Example

This example shows one way to define Ctrl-A (in hexadecimal), Ctrl-P, and Shift-Q as accelerators.

myaccel ACCELERATORS

BEGIN

  0x41,1, CONTROL, NOINVERT

  "^P",2

  VK_Q,3, VIRTKEY, SHIFT

END

If you want to use identifiers rather than numbers to identify your accelerators, use a C-style header file (with an .H extension) or a Pascal Include file (with an .INC extension). For Pascal, you can also keep your identifiers in a unit.

This example uses #defines in the file KEYNAMES.H.

#define SelectAll  1

#define PrintNow   2

#define Quit       3

Then your script statements in the .RC file can use identifiers rather than numbers to uniquely identify each accelerator:

#include "keynames.h"

myaccel ACCELERATORS

BEGIN

  "^a", SelectAll, NOINVERT

  0x50, PrintNow, CONTROL

  "Q",  Quit

END


BITMAP

Description

A binary resource statement that associates a file containing bitmap resource data with a resource name and causes the bitmap data to be included in the current project.

Syntax

resource-name BITMAP [load-type] [memory-option] filename

Syntax Elements

resource-name	A text identifier or a numeric ID for this resource. The identifier or number must be unique within the BITMAP type. Numeric IDs must be positive integers.

load-type	Specifies when the resource is loaded into memory.

memory-option	Specifies how the resource is loaded into memory.

filename	The name of the DOS file containing the bitmap data. A relative or full path name can be used to specify files which are not in the current working directory. The data in the specified file is included in the current project.

Remarks

You can write a BITMAP statement with the same syntax as RCDATA.

Example

The bitmap "image" is in IMAGEF.BMP:

image BITMAP imagef.bmp

The bitmap 200 is in FRAME.BMP. It is loaded when the application starts:

200 BITMAP PRELOAD frame.bmp

The bitmap "bigstar" is in STAR.BMP. It cannot be moved around in memory:

bigstar BITMAP FIXED star.bmp


load-type and memory-option

Description

load-type and memory-option specify when and how resources are loaded into memory.

Load-type

The following keywords specify when a resource is loaded into memory. LOADONCALL is the default load type if no keyword is specified.

PRELOAD	Resource loaded at program start.

LOADONCALL	Resource is loaded when referenced by the application.

Memory-option

The following keywords specify how a resource is loaded into memory. The resource can be fixed at the same address at which memory-option is loaded, or it can be relocatable.

Additionally,the resource can be discardable or nondiscardable. MOVEABLE and DISCARDABLE are the default values.

DISCARDABLE	Can be purged to make space.

FIXED	Resource stays at same address.

IMPURE	Resource is modified after loading.

MOVEABLE	Resource can be relocated in memory.

NONDISCARDABLE	Must stay in memory.

PURE	Resource is not modified after it is loaded.


CHECKBOX

Description

A DIALOG definition that places a check box control in a dialog box.

Syntax

CHECKBOX text, control-ID, x, y, width, height, [c-style]

Syntax Elements

text	A text string in double quotes. It is displayed next to the button. It can be specified as a keyboard accelerator mnemonic.

control-ID	A numeric identifier for this control. This number must be a unique short integer. Windows uses the control-ID to indicate which control has been selected.

x, y	Horizontal and vertical positions, respectively, of the button relative to the dialog window in which it appears. These numbers are specified in dialog units.

width, height 	The width and height of the control (specified in dialog units).

c-style 	The control style constant (an unsigned long integer value that is interpreted as a series of bit flags). Constants can be combined with a bitwise OR to apply multiple styles to the control. The field can contain the window style constants

WS_DISABLED,

WS_TABSTOP

WS_GROUP

and any combination of the BUTTON class style constants. The default styles are BS_CHECKBOX and WS_TABSTOP.

Remarks

CHECKBOX is valid only within a DIALOG definition.

A check box is a square button with descriptive text to the left or right of the button. Normally, text is displayed to the right of the button. You can change this to the left side with the appropriate c-style.

A check box control maintains a state: It is either checked (in which case, a large X fills the square) or unchecked. Check box controls do not change state automatically: The application programmer must change their state in response to BN_CLICKED notification messages. For that reason, it's a good idea to use the auto-check box control. The CONTROL definition must be used to specify an auto-check box.

A check box is a member of the button class. When the user presses the mouse button in the control's area, the button is highlighted. When the mouse button is released, it is returned to normal, and a message is sent to the parent window indicating that the button has been pressed.

Example

CHECKBOX "Backup files", 110, 13, 30, 60, 12


Dialog units

Dialog units represent the units used to specify a dialog window.

Horizontal dialog units are 1/4 the width of a character in the dialog's font. Vertical dialog units are 1/8 the height of a character in the dialog's font.

They are calculated from the height and width of the dialog's font.


COMBOBOX

Description

A DIALOG definition that creates a combo box, a combination of either a static text field or an edit field with a list box.

Syntax

COMBOBOX ID, x, y, width, height, [c-style]

Syntax Elements

ID	A numeric identifier for this control. This number must be a unique short integer. Windows uses the control ID to indicate which control has been selected.

x, y	Integer values that specify the x- and y-coordinates of the upper left corner of the COMBOBOX control. These values are specified in dialog units.

width, height 	Integer values that specify the size of the control. These values are specified in dialog units.

c-style	The control style constant (an unsigned long integer value that is interpreted as a series of bit flags). Constants can be combined with a bitwise OR to apply multiple styles to the control. The field can contain the window style constants

WS_DISABLED

WS_GROUP

WS_TABSTOP

WS_VSCROLL

as well as any combination of the COMBOBOX class style constants. The default styles are WS_TABSTOP and CBS_SIMPLE.

Remarks

If a static text field is used, this field displays the current selection in the list box. If an edit field is used, the selection is typed in and the list box highlights the first item that matches the typed entry.

Example

COMBOBOX 107, 10, 9, 49, 33, WS_VSCROLL | WS_TABSTOP


CONTROL

Description

A DIALOG definition that places any type of control in a dialog box.

Syntax

CONTROL text, control-ID, c-class, c-style, x, y, width, height

Syntax Elements

text	A text string in double quotes. This text is displayed, if appropriate, for the type of control specified. It can be specified as a keyboard accelerator mnemonic.

control-ID	A numeric identifier. This number can be a unique short integer, although unreferenced static controls are usually given a control ID of -1 to document that they are truly static. Windows uses the control ID to indicate which control has been selected.

c-style	The control style constant (an unsigned long integer value that is interpreted as a series of bit flags). Constants can be combined with a bitwise OR to apply multiple styles to the control. The options available to you depend on the c-class value. There is no default style. The high-order word of this field is reserved for Windows. The low-order word is available for user-defined control styles.

x, y	Horizontal and vertical positions of the control relative to the dialog window in which it appears. These numbers are specified in dialog units.

width, height	The width and height of the control. These numbers are specified in dialog units.

c-class	A byte or a string indicating the control's class. The standard classes have predefined constants that can be used to identify them:

Constant	Description

BUTTON	The button class includes controls that function like physical buttons. The user "presses" the control using the mouse or keyboard, and the control performs some specific action. Buttons include push buttons, radio buttons, check boxes, and so on.

COMBOBOX	A combo box is a combination of a list box and an edit control. The list box can be displayed at all times (CBS_SIMPLE) or dropped by clicking in a drop-down button next to the edit control. The edit control may or may not allow user entry.

EDIT	This class is used for editable text fields. These fields are a rectangular area with space for one or more lines of text. The text can be edited by the user with the mouse or keyboard.

LISTBOX	This class is used for list boxes. These boxes contain a list of strings or application program drawn items from which the user can select. LISTBOX is typically used for lists of file names, fonts, styles, and so on.

SCROLLBAR	This class is used for the standard scroll bar control and for size boxes. Scroll bar controls have the same appearance as a window's scroll bar, except they can be positioned anywhere within a window.

STATIC	This class is used for static controls. Such controls include non-editable text and icons.

Remarks

CONTROL is valid only within a DIALOG definition. This definition can duplicate the function of the definitions:

CHECKBOX

COMBOBOX

CTEXT

DEFPUSHBUTTON

EDITTEXT

GROUPBOX

ICON

LISTBOX

LTEXT

PUSHBUTTON

RADIOBUTTON

RTEXT

SCROLLBAR

Example

CONTROL "Forward", 105, "BUTTON", BS_RADIOBUTTON | WS_GROUP, 68, 49, 45, 12


CTEXT

Description

A DIALOG definition that specifies a text string, its attributes, and where it's located in the dialog box.

Syntax

CTEXT text, control-ID, x, y, width, height, [c-style]

Syntax Elements

text	A text string, enclosed in quotes, that appears in the dialog window. It can be specified as a keyboard accelerator mnemonic.

A common Windows programming technique is to label an edit control by preceding it with a static text control. This label contains a mnemonic for the edit field, such as "&Name". If the CTEXT control doesn't use the WS_TABSTOP control style, Windows will set the focus in the next control.

control-ID	A numeric identifier. The control ID is used by Windows and an application to identify the control within the dialog. If there is no need to refer to the control at runtime (as is most often the case with static controls), usually this field is set to -1 to document that it is truly static.

x, y	Horizontal and vertical positions of the text relative to the dialog window in which the text appears. These numbers are specified in dialog units.

width, height	The size of the control. These numbers are specified in dialog units. The static text appears centered within the specified area. If the text is too wide to fit on a single line, Windows automatically word wraps the text to multiple lines.

c-style	The control style constant (an unsigned long integer value that is interpreted as a series of bit flags). More than one control style can be combined using a bitwise OR. Defaults are the STATIC class style constant SS_CENTER and the window style constant WS_GROUP.

Remarks

CTEXT defines centered static text in a dialog window. The text is centered within the specified rectangle. If the text is too wide to fit within the rectangle, it is automatically wrapped.

CTEXT can only appear within a DIALOG definition.

Example

This example centers static text in a rectangle of a specified size:

CTEXT "Copyright 1991 Acme Software", -1, 36, 22, 73, 8

See Also

LTEXT

RTEXT


CURSOR

Description

A binary resource statement that causes cursor data to be included in the current project.

Syntax

resource-name CURSOR [load-type] [memory-option] filename

Syntax Elements

resource-name	A text identifier or numeric ID for this resource. The identifier or number must be unique within the cursor type. Numeric IDs must be positive integers.

load-type	Specifies when the resource is loaded into memory.

memory-option	Specifies how the resource is loaded into memory.

Example

This example names the cursor resource 20 and tells Resource Workshop that the resource is found in the file HAND.CUR.

20 CURSOR hand.cur

This example names the resource "paintcan" and tells Resource Workshop it can be found in the file PAINT.CUR. The resource is loaded into memory when the application begins. It must remain in the same place in memory while the application runs. The application can't remove it from memory before the application ends.

paintcan CURSOR PRELOAD FIXED NONDISCARDABLE paint.cur


Keyboard accelerator mnemonic

To specify a keyboard accelerator mnemonic, place an ampersand (&) before the letter which is to serve as the mnemonic.

This key is underlined by Windows when displayed, and the keyboard focus is assigned to the control when the user presses the mnemonic key with the Alt modifier key held down. To include an ampersand in the displayed text, use two ampersands (&&).


Menu mnemonic

A menu mnemonic is used to activate the command using the keyboard.

Place the ampersand (&) character in front of the character in the item text which is to serve as the mnemonic. To include the & character in the actual item text, use &&. To include the single quote character in the item text, use two single quote characters.


DEFPUSHBUTTON

Description

A DIALOG definition that places a default push button control in a dialog box.

Syntax

DEFPUSHBUTTON text, control-ID, x, y, width, height, [c-style]

Syntax Elements

text	A text string in double quotes. This text is displayed inside the button area. It can be specified as a keyboard accelerator mnemonic.

control-ID	A numeric identifier for this control. It must be a unique integer. The control ID is used by Windows to indicate which control has been selected. By convention, only one DEFPUSHBUTTON is included in a dialog. It is given the control ID IDOK (1).

 When a user presses the Enter key in a modal dialog box, Windows sends a WM_COMMAND message with wParam set to IDOK. Also, when the user presses the Esc key, Windows sends a WM_COMMAND with wParam set to IDCANCEL (2).

x, y	Horizontal and vertical positions of the button relative to the dialog window in which it appears. These numbers are specified in dialog units.

width, height	The width and height of the control. These numbers are specified in dialog units.

c-style	The control style constant (an unsigned long integer value that is interpreted as a series of bit flags). Constants can be combined with a bitwise OR to apply multiple styles to the control. The field can contain the window style constants

WS_DISABLED

WS_GROUP

WS_TABSTOP

and any combination of the BUTTON class style constants. The default styles are BS_DEFPUSHBUTTON and WS_TABSTOP.

Remarks

A DEFPUSHBUTTON is a square button containing text describing its action. This control is almost identical to a normal push button, except it has a heavy border that indicates to the user it is the default action for this dialog window.

DEFPUSHBUTTON is valid only within a DIALOG definition. A DEFPUSHBUTTON is a member of the BUTTON class.

Example

DEFPUSHBUTTON "OK", 104, 11, 71, 24, 14, BS_DEFPUSHBUTTON | WS_TABSTOP


DIALOG

Description

A multiple-line statement that specifies a dialog window.

Syntax

resource-name DIALOG [load-type] [memory-option] x, y, width, height

[STYLE w-style]

[CAPTION w-cap]

[MENU res-name]

[CLASS w-class]

[FONT f-spec]

BEGIN

  dialog-controls

END

Syntax Elements

load-type	Specifies when the resource is loaded into memory.

memory-option	Specifies how the resource is loaded into memory.

x, y	Horizontal and vertical positions of the upper left corner of the dialog window's client area. These coordinates can either be relative to the window's parent or owner window, or relative to the origin of the screen. This is determined by the window's style setting. Dialog windows are positioned relative to their parent or owner window unless the dialog window style constant DS_ABSALIGN is used.

width, height	The size of the client area of the window in dialog units.

w-style	The window style constant (an unsigned long integer value).If you don't specify a w-style, the default values WS_POPUP, WS_BORDER, and WS_SYSMENU are used.

w-cap	The dialog box's title. w-cap is a text string enclosed in double quotes. If the dialog box has a caption bar, this text will be displayed there. If the caption line is not present in the DIALOG definition, the caption will be empty.

res-name	The menu line in the DIALOG definition. It associates a menu resource with this dialog. res-name is the resource identifier or numeric ID of the associated menu. If the menu line is not present in the DIALOG definition, no menu is associated with the window.

w-class	The class line in the DIALOG definition. It overrides the standard processing of a dialog window. The dialog window is assigned the specified class, rather than the standard dialog class. w-class is an integer or text string that specifies the desired window class. Predefined control class names cannot be used with this definition.

Use the class field with great caution. By default, dialog windows are given a class that Windows implements. The programmer then provides the Windows dialog manager with a dialog function that allows some measure of control over dialog window behavior.

Using a custom dialog class provides additional control over the behavior of the dialog window. In order to create a custom dialog class, you must set the cbWndExtra field of the WNDCLASS structure to at least as many bytes as used by DLGWINDOWEXTRA, the default dialog class. Once this hurdle has been passed, the additional control provided by the custom class is illusory because much of the Windows dialog manager is implemented in the IsDialogMessage function, not the dialog window procedure.

f-spec,	The font specification. It consists of a point size (in pixels) followed by a font typeface string (for example, 12, "Helv"). Windows uses the bold (approximately 700) weight for the font when this field is used. To use a lighter-weight attribute, use the WM_SETFONT message at runtime to set the font.

dialog-controls	Definition(s) that specify the content of the dialog windows. This includes static and editable text, various boxes and buttons, controls, and icons.

Here are the dialog control statements:

Statement	Description

CHECKBOX	A square control with descriptive text next to it; when it's selected, a message is sent to the dialog's parent window.

COMBOBOX	A combination of either a static text field or an edit field with a list box.

CONTROL	A user-defined control window. Each control window belongs to a control class. Normally, you don't have to be concerned about this, but if you use the CONTROL statement to define your own control window, you'll need to specify a control class.

CTEXT	Rectangular control with centered text.

DEFPUSHBUTTON	Same as PUSHBUTTON except it has a heavy border indicating to the user it's the default.

EDITTEXT	An editable rectangular text field.

GROUPBOX	A rectangle that groups other controls.

ICON	An icon displayed in the dialog.

LISTBOX	A rectangle that lists choices the user can select.

LTEXT	Rectangular control with flush-left text.

PUSHBUTTON	A button containing text describing its action; when it's selected, a message is sent to the dialog's parent window.

RADIOBUTTON	A round control with descriptive text next to it; when it's selected, a message is sent to the dialog's parent window.

RTEXT	Rectangular control with flush-right text.

SCROLLBAR	A rectangular control with a scroll box and direction arrows at each end; when it's selected, a message is sent to the window's parent.

The following definitions are used in specifying the content of a dialog window:

Static items:

CTEXT text, control-ID, x, y, width, height, [c-style]

LTEXT text, control-ID, x, y, width, height, [c-style]

RTEXT text, control-ID, x, y, width, height, [c-style]

GROUPBOX text, control-ID, x, y, width, height, [c-style]

ICON res-name, control-ID, x, y, width, height, [c-style]

Editable text:

EDITTEXT control-ID, x, y, width, height, [c-style]

Controls:

DEFPUSHBUTTON text, control-ID, x, y, width, height, [c-style]

PUSHBUTTON text, control-ID, x, y, width, height, [c-style]

RADIOBUTTON text, control-ID, x, y, width, height, [c-style]

CHECKBOX text, control-ID, x, y, width, height, [c-style]

LISTBOX control-ID, x, y, width, height, [c-style]

CONTROL text, control-ID, class, c-style, x, y, width, height

SCROLLBAR control-ID, x, y, width, height, [c-style]

Remarks

A dialog window includes the window style, class, size, location, and the controls which will appear in the window. Dialog windows can contain text, check boxes, various buttons, icons, controls, list boxes, and so on.

Example

This example shows how to use the DIALOG statement to display a simple dialog box that asks the user to select an option using radio buttons:

direction DIALOG 10, 10, 320, 130

STYLE WS_POPUP | WS_BORDER

CAPTION "Search Direction"

BEGIN

  CTEXT "Choose a direction:", 1, 15, 15, 250, 12

  RADIOBUTTON "&Forward",  2, 80, 35, 60, 12

  RADIOBUTTON "&Backward", 3, 80, 55, 60, 12

END


EDITTEXT

Description

A DIALOG definition that places an editable text field in a dialog box.

Syntax

EDITTEXT control-ID, x, y, width, height, [c-style]

Syntax Elements

control-ID	A numeric identifier for this control. This number must be a unique integer. The control ID is used by Windows to indicate which control has been selected.

x, y	Horizontal and vertical positions of the edit text control relative to the dialog window in which it appears. These numbers are specified in dialog units.

width, height	The width and height of the edit text control. These numbers are specified in dialog units.

c-style	The control style constant (an unsigned long integer value that is interpreted as a series of bit flags). Constants can be combined with a bitwise OR to apply multiple styles to the control. The field may contain the window style constants

WS_DISABLED

WS_GROUP

WS_HSCROLL

WS_TABSTOP

WS_VSCROLL

and any combination of the EDIT class style constants. The default styles are ES_LEFT, WS_BORDER and WS_TABSTOP.

Remarks

Text can be edited using the mouse, cursor keys, Backspace, and Del. An edit text control belongs to the EDIT class.

EDITTEXT is valid only within a DIALOG definition.

Example

This is how you would specify an EDIT control with coordinates of 15,15 for the control's upper left corner. The control is 100 dialog units wide and 10 dialog units high.

EDITTEXT 5, 15, 15, 100, 10


FONT

Description

A binary resource statement definition that associates a file containing font resource data with a resource number. It also causes the font data to be included in the current project.

Syntax

resource-num FONT [load-type] [memory-option] filename

Syntax Elements

resource-num	The resource number. It can be either a unique name (text) or an integer value that is unique within the font resource type. This number identifies the font; you can't use resource names for fonts.

load-type	Specifies when the resource is loaded into memory.

memory-option	Specifies how the resource is loaded into memory.

filename	The name of the DOS file containing the font data. A full path name can be used to specify files which are not in the current working directory. The data in the specified file is included in the current project.

Example

This example identifies a font as 2 and tells Resource Workshop the font is in the file VETICA.FON.

 2 FONT vetica.fon

This example identifies a font as 27 and tells the Resource Workshop the font is in the file BOOK.FON. The font resource is loaded when the application starts and remains in memory until the application ends:

27 FONT PRELOAD NONDISCARDABLE book.fon


GROUPBOX

Description

A DIALOG definition that places a static group box in a dialog box.

Syntax

GROUPBOX text, control-ID, x, y, width, height, [c-style]

Syntax Elements

text	A text string in double quotes. This text is displayed at the top of the group box. It can be specified as a keyboard accelerator mnemonic.

control-ID	A numeric identifier for this control. This number can be a unique integer, but is often -1. The control ID is used by Windows to indicate which control has been selected.

x, y	Horizontal and vertical positions of the group box relative to the dialog window in which it appears. These numbers are specified in dialog units.

width, height	The width and height of the group box. These numbers are specified in dialog units.

c-style	The control style constants (an unsigned long integer value that is interpreted as a series of bit flags). Constants can be combined with a bitwise OR to apply multiple styles to the control. The field may contain the window style constants

WS_DISABLED

WS_TABSTOP

or any combination of the BUTTON class style constants. The default styles are BS_GROUPBOX and WS_TABSTOP.

Remarks

You usually use a group box to visually group a number of related controls. The user can then easily see which controls are related. The text field of the group box definition usually describes the group. A group box consists of a rectangle of the specified size, with a text title overwriting the left part of the top line of the rectangle.

GROUPBOX is valid only within a DIALOG definition.

Example

This example creates a group box in a dialog window. The group box is titled "Command set" in the upper left corner. The upper left corner of the group box control begins at coordinates 30,15, and is 30 dialog units wide and 60 dialog units high.

GROUPBOX "Editor options", 30, 15, 30, 60


ICON

Description

There are two types of icon definitions:

type 1 icon	A binary resource statement that associates a file containing icon resource data with a resource name.

type 2 icon	A DIALOG definition that specifies a static icon control in a dialog box.

Syntax

For a type 1 icon statement:

resource-name ICON [load-type] [memory-option] filename

For a type 2 icon definition:

ICON resource-name, control-ID, x, y, width, height, [c-style]

Syntax Elements

For a type 1 icon statement:

load-type	Specifies when the resource is loaded into memory.

memory-option	Specifies how the resource is loaded into memory.

resource-name	A text identifier or numeric ID for this resource. The identifier or number must be unique. Numeric IDs must be integers.

filename	The name of the DOS file containing the icon data. A full path name can be used to specify files which are not in the current working directory. The data in the specified file is included in the current project.

For a type 2 icon definition:

resource-name	The identifier of the icon resource to be included in the dialog window. This resource identifier is assigned to the icon using a type 1 icon definition. Note that this is not the icon's file name. If the resource name is a text identifier, it must be enclosed in quotes.

control-ID	A numeric identifier for this control. This number must be a unique integer. The control ID is used by Windows to indicate which control has been selected.

x, y	Horizontal and vertical positions of the icon relative to the dialog window in which the icon appears. These numbers are specified in dialog units.

width, height	Ignored. The icon is automatically sized.

c-style	The control style constant (an unsigned long integer value that is interpreted as a series of bit flags). Constants can be combined with a bitwise OR to apply multiple styles to the control. The only permissible style is the STATIC class style constant, SS_ICON.

Remarks

The type 1 icon definition tells the Resource Workshop which file an icon's data is contained in, and gives this icon the specified resource-name. Data from the indicated file is included in the executable file when the application is built.

The type 2 icon definition refers to an icon that was specified with a type 1 definition (or defined in a free-form resource). Type 2 icon definitions place a static icon controls within a dialog window. This type of ICON definition is only valid within a DIALOG definition.

Example

This Type 1 example names an icon "myicon" and tells Resource Workshop to look for it in the file MYICON.ICO:

myicon ICON myicon.ico

This Type 2 example:

-	creates an icon

-	specifies the name of the icon (the icon will be defined elsewhere in the resource file with a Type 1 icon statement)

−	identifies it with a unique integer

−	specifies the coordinates of the upper left corner as 30,40.

The icon is 20 dialog units wide sand 20 dialog units high:

ICON "myicon" 20, 20, 20


LISTBOX

Description

A DIALOG definition that places a list box control in a dialog box.

Syntax

LISTBOX control-ID, x, y, width, height, [c-style]

Syntax Elements

control-ID	The numeric identifier for this control. This number must be a unique integer. The control ID is used by Windows to indicate which control has been selected.

x, y	Horizontal and vertical positions of the list box relative to the dialog window in which it appears. These numbers are specified in dialog units.

width, height	The width and height of the control. These numbers are specified in dialog units.

c-style	The control style constant (an unsigned long integer value that is interpreted as a series of bit flags). Constants can be combined with a bitwise OR to apply multiple styles to the control. The field may contain the window style constants

WS_BORDER,

WS_DISABLED

WS_VSCROLL

and any of the LISTBOX class style constants. Default values are LBS_NOTIFY,  WS_VSCROLL, and WS_BORDER.

Remarks

A listbox is an area where multiple text strings are displayed. A listbox is a member of the listbox class.

LISTBOX is valid only within a DIALOG definition.

Example

This list box is:

-	uniquely identified as 200

-	has coordinates for the upper-left corner at 50,60 in dialog units

-	is 60 dialog units wide and 52 dialog units high.

LISTBOX 200, 50, 60, 60, 52


LTEXT

Description

A DIALOG definition that defines left justified static text in a dialog box.

Syntax

LTEXT text, control-ID, x, y, width, height, [c-style]

Syntax Elements

text	A text string, enclosed in quotes, that appears in the dialog window. It can be specified as a keyboard accelerator mnemonic.

A common Windows programming technique is to label an edit control by preceding it with a static text control. The static label contains a mnemonic for the edit field, such as "&Name". If the LTEXT control does not use the window style constant WS_TABSTOP, Windows sets the focus in the next control.

control-ID	A numeric identifier for this control. This number must be a unique integer. The control ID is used by Windows to indicate which control has been selected. If there is no need to refer to the control at runtime (as is most often the case with static controls), this field is by convention set to -1 to document that it is truly static.

x, y	Horizontal and vertical positions of the text relative to the dialog window in which the text appears. These numbers are specified in dialog units.

width, height	The size of the control in dialog units. The static text appears centered within the specified area.

c-style	The control style constant (an unsigned long integer value that is interpreted as a series of bit flags). More than one control style can be combined using a bitwise OR. The default style is the STATIC class style constants SS_LEFT and the window style WS_GROUP. The WS_GROUP style is always set for static text.

Remarks

LTEXT specifies a text string, its attributes, and where it is located in the dialog window. The text is aligned flush left within the specified rectangle. If the text is too wide to fit within the rectangle, it automatically wraps.

This definition can only appear within a DIALOG definition.

Example

This example creates a disabled control 93 dialog units wide and 8 dialog units high. The left-corner of the rectangular control begins at coordinates 104, 4. The text "Version 3.10" is flush left within the rectangle.

LTEXT "Version 3.10", 104, 4, 60, 93, 8, WS_DISABLED

See Also

CTEXT

RTEXT


VERSIONINFO

Description

Version information resource.

Syntax

versionID VERSIONINFO fixed-info BEGIN block-statements END

Syntax Elements

versionID	Version information resource identifier. Must be set to1.

fixed-info	Version information that consists of:

Statement	Description

FILEVERSION version	Binary version number for file. A 64-bit, integer number.

PRODUCTVERSION version	Binary version number for product that file is distributed with. A 64-bit, integer number.

FILEFLAGSMASK fileflags	Specifies valid bits in FILEFLAGS statement. If a bit is set, the corresponding bit in FILEFLAGS is valid.

FILEFLAGS fileflags	Boolean attributes of file.

FILEOS fileos	Operating system file designed for.

FILETYPE filetype	File type.

FILESUBTYPE subtype	File function. subtype is 0 unless type parameter in FILETYPE VFT_DRV, VFT_FONT, or VFT_VXD.

block-statements	One or more version information blocks. Blocks are either string information or variable information.

String information block:

BLOCK "StringFileInfo"

BEGIN

    BLOCK "lang-charset"

    BEGIN

        VALUE "string-name", "value"

            .

            .

            .

    END

END

where:

lang-charset	Hex string for language and character set.

string-name	Name of a value in the block.

VALUE	Character string specificying value of correspoinding string-name. There can be more than one value statement.

Value information block:

BLOCK "VarFileInfo"

BEGIN

    VALUE "Translation",

      langID, charsetID

           .

           .

           .

END

where:

langID/charsetID	Language and character set identifier.There can be more than one identifier pair. Each pair must be separated from the preceding pair with a comma.

Remarks

VERSIONINFO creates a version information resource. The resource contains the:

-	file version number

-	product version number

-	operating system

-	file type

-	file function

This resource is intended for use with File Installation functions.


fileflags parameter for VERSIONINFO
fileflags

Description

Parameter used in the VERSIONINFO statement. To use these constants, VER.H must be included in your resource-definition file.

Value	Meaning

VS_FF_DEBUG	Debugging - file contains debugging information or was compiled with debugging features enabled.

VS_FF_INFOINFERRED	Incorrect version information - file contains a dynamically-created version information resource with possible empty or incorrect blocks. Do not use this value in version information resources created with the VERSIONINFO statement.

VS_FF_PATCHED	Patch - file has been modified; is not identical to the original shipping file of the same version number.

VS_FF_PRERELEASE	Pre-release - file is a development version, not a commercially released product.

VS_FF_PRIVATEBUILD	Private build - file was not built using standard release procedures. When you use this value, include the PrivateBuild string in the string-name parameter.

VS_FF_SPECIALBUILD	Special build - file was built by the original company using standard release procedures, but is a variation of the standard file of the same version number. When you use this value, include the SpecialBuild string in the string-name parameter.


fileos parameter for VERSIONINFO
fileos

Description

Parameter used in the VERSIONINFO statement. To use these constants, VER.H must be included in your resource-definition file.

Value	Meaning

VOS_UNKNOWN	File designed for unknown operating system.

VOS_DOS	File designed for MS-DOS.

VOS_NT	File designed for Windows NT.

VOS_WINDOWS16	File designed for Windows 3.0 or later.

VOS_WINDOWS32	File designed for Windows 32-bit.

VOS_DOS_WINDOWS16	File designed for Windows 3.0 or later running on MS-DOS.

VOS_DOS_WINDOWS32	File designed for Windows 32-bit running on MS-DOS.

VOS_NT_WINDOWS32	File designed for Windows 32-bit running on Windows NT.

The values 0x00002L, 0x00003L, 0x20000L and 0x30000L are reserved.


filetype parameter for VERSIONINFO
filetype

Description

Parameter used in the VERSIONINFO statement. To use these constants, VER.H must be included in your resource-definition file.

Value	Meaning

VFT_UNKNOWN	File type is unknown to Windows.

VFT_APP	File contains an application.

VFT_DLL	File contains a dynamic-link library.

VFT_DRV	File contains a device driver. If you use this constant, include a more specific description of the driver in FILESUBTYPE.

VFT_FONT	File contains a font. If you use this constant, include a more specific description of the font file in FILESUBTYPE.

VFT_VXD	File contains a virtual device. If you use this constant, include a more specific description of the device in FILESUBTYPE.

VFT_STATIC_LIB	File contains a static-link library.

All other values are reserved for use by Microsoft.


subtype parameter for VERSIONINFO
subtype

Description

Parameter used in the VERSIONINFO statement. To use these constants, VER.H must be included in your resource-definition file.

subtype can be one of the following values if FILETYPE specifies VFT_DRV:

Value	Meaning

VFT2_UNKNOWN	Driver type is unknown to Windows.

VFT2_DRV_COMM	File contains a communications driver.

VFT2_DRV_PRINTER	File contains a printer driver.

VFT2_DRV_KEYBOARD	File contains a keyboard driver.

VFT2_DRV_LANGUAGE	File contains a language driver.

VFT2_DRV_DISPLAY	File contains a display driver.

VFT2_DRV_MOUSE	File contains a mouse driver.

VFT2_DRV_NETWORK	File contains a network driver.

VFT2_DRV_SYSTEM	File contains a system driver.

VFT2_DRV_INSTALLABLE	File contains an installable driver.

VFT2_DRV_SOUND	File contains a sound driver.

subtype can be one of the following values if FILETYPE specifies VFT_FONT:

Value	Meaning

VFT2_UNKNOWN	Font type is unknown to Windows.

VFT2_FONT_RASTER	File contains a raster font.

VFT2_FONT_VECTOR	File contains a vector font.

VFT2_FONT_TRUETYPE	File contains a TrueType font.

subtype must be the virtual-device identifier included in the virtual device control block if

FILETYPE specifies VFT_VXD.

All subtype values not listed here are reserved for use by Microsoft.


lang and charset parameter for VERSIONINFO
langID and charsetID

Description

Parameter used in the VERSIONINFO statement. To use these constants, VER.H must be included in your resource-definition file.

langID can be one of the following values:

Value	Language

0x0401	Arabic

0x0402	Bulgarian

0x0403	Catalan

0x0404	Traditional Chinese

0x0405	Czech

0x0406	Danish

0x0407	German

0x0408	Greek

0x0409	U.S. English

0x040A	Castilian Spanish

0x040B	Finnish

0x040C	French

0x040D	Hebrew

0x040E	Hungarian

0x040F	Icelandic

0x0410	Italian

0x0411	Japanese

0x0412	Korean

0x0413	Dutch

0x0414	Norwegian - Bokmal

0x0415	Polish

0x0416	Brazilian Portuguese

0x0417	Rhaeto-Romanic

0x0418	Romanian

0x0419	Russian

0x041A	Croato-Serbian (latin)

0x041B	Slovak

0x041C	Albanian

0x041D	Swedish

0x041E	Thai

0x041F	Turkish

0x0420	Urdu

0x0421	Bahasa

0x0804	Simplified Chinese

0x0807	Swiss German

0x0809	U.K. English

0x080A	Mexican Spanish

0x080C	Belgian French

0x0810	Swiss Italian

0x0813	Belgian Dutch

0x0814	Norwegian - Nynorsk

0x0816	Portuguese

0x081A	Serbo-Croatian (cyrillic)

0x0c0C	Canadian French

0x100C	Swiss French

charsetID can be one of the following values:

Value	Character set

0	7-bit ASCII

932	Windows, Japan (Shift - JIS X-0208)

949	Windows, Korea (Shift - KSC 5601)

950	Windows, Taiwan (GB5)

1200	Unicode

1250	Windows, Latin-2 (Eastern European)

1251	Windows, Cyrillic

1252	Windows, Multilingual

1253	Windows, Greek

1254	Windows, Turkish

1255	Windows, Hebrew

1256	Windows, Arabic


stringname parameter for VERSIONINFO
stringname

Description

Parameter used in the VERSIONINFO statement. To use these constants, VER.H must be included in your resource-definition file.

Name	Value

Comments	Additional information for diagnostic purposes. Optional.

CompanyName	The company that produced the file. Required.

FileDescription	File description. You can display this string in a list box during installation. Required.

FileVersion	File version number. Required.

InternalName	File internal name. If file does not have internal name, use original filename, without extension. Required.

LegalCopyright	File copyright notices. Optional.

LegalTrademarks	Trademarks and registered trademarks that apply to file. Optional.

OriginalFilename	Original file name, not including path. Required.

PrivateBuild	Information about private version of file. Required if VS_FF_PRIVATEBUILD is set in FILEFLAGS.

ProductName	Name of product file is distributed with. Required.

ProductVersion	Version of product file is distributed with. Required.

SpecialBuild	Specifies how this version of file differs from standard version. Required if VS_FF_SPECIALBUILD is set in FILEFLAGS.


MENU

Description

A multiple-line statement that defines a menu resource and specifies which menu items appear on this menu.

Syntax

resource-name MENU [load-type] [memory-option]

BEGIN

  item-definitions

END

Syntax Elements

resource-name	A text identifier or numeric ID for this resource. The identifier or number must be unique. Numeric IDs must be integers.

load-type	Specifies when the resource is loaded into memory.

memory-option	Specifies how the resource is loaded into memory.

item-definitions	Contain one or more MENUITEM or POPUP definitions. The MENUITEM definition specifies individual menu items, and the POPUP definition describes a pop-up menu (also know as a drop-down menu).

Remarks

A MENU definition contains the item definitions, MENUITEM and POPUP.

Example

This example specifies the main menu of an application. On the main menu are two options: File and Help. File is a pop-up menu (commonly known as a drop-down menu) with several options, each defined with a MENUITEM substatement.

The ampersand (&) underlines the letter that immediately follows it. This lets the user choose the command from the menu by typing that letter.

mainmenu MENU PRELOAD

BEGIN

  POPUP      "&File"

  BEGIN

    MENUITEM "&New", 100

    MENUITEM "&Open", 101

    MENUITEM "&Close", 102

    MENUITEM "&Save", 103

    MENUITEM "Save &As", 104

    MENUITEM SEPARATOR

    MENUITEM "&Print", 105

    MENUITEM SEPARATOR

    MENUITEM "E&xit", 106

  END

  MENUITEM "&Help", 200

END


MENUITEM

Description

A MENU definition that defines a single menu item or a menu separator.

Syntax

MENUITEM [item-text] [item-ID] [item-attributes]

or

MENUITEM SEPARATOR

Syntax Elements

item-text 	Describes the menu selection. It is a character string enclosed in double quotes. The item-text also indicates which character in the menu item serves as the menu's mnemonic.

The item text string can also include the following escape codes: \a and \t. \t should be used only within a POPUP definition and not for items in the main menu bar. It inserts a	in the item text aligning the text. The \a escape code aligns the following text flush right.

item-ID	An integer value that identifies the menu item. Windows uses the value to indicate which menu item has been selected.

item-attributes	Accepts one or more keywords that describe the menu item's state (active, inactive, grayed, checked, etc.) The keywords GRAYED and INACTIVE are mutually exclusive. Other keywords can be used together by combining their values with a bitwise OR.

GRAYED	Item is unavailable for selection.

INACTIVE	Item is never available for selection.

CHECKED	Checkmark appears next to item. Not supported for top-level menu items.

HELP	Appears on right side of menu bar.

MENUBREAK	Item begins a new menu column.

MENUBARBREAK	Item begins a new menu row.

SEPARATOR	Indicates that this menu item is a separator line, rather than a selectable item. Separator lines are horizontal lines separating menu items when used in pop-up menus, and are vertical lines separating menu titles when used in the menu bar.

Remarks

The MENUITEM definition associates an item ID with a specific menu element.

MENUITEM can be used only within a MENU or POPUP definition.

Example

The MENUITEM statements in this example specify the options that will appear on the menu. Note the use of SEPARATOR to separate the file options from the printing options and to separate the printing options from the exit option.

The ampersand (&) underlines the letter that immediately follows it. This lets the user choose the command from the menu by typing that letter.

mainmenu MENU PRELOAD

BEGIN

  POPUP      "&File"

  BEGIN

    MENUITEM "&New", 100

    MENUITEM "&Open", 101

    MENUITEM "&Close", 102, GRAYED

    MENUITEM "&Save",103

    MENUITEM "Save &As", 104

    MENUITEM SEPARATOR

    MENUITEM "&Print", 105

    MENUITEM "&Draft Printing", 107, CHECKED

    MENUITEM SEPARATOR

    MENUITEM "E&xit", 106

  END

  MENUITEM "&Help", 200

END


POPUP

Description

A MENU definition that defines a pop-up menu (also known as a drop-down menu).

Syntax

POPUP [popup-name] [popup-attributes]

BEGIN

  item-definitions

END

Syntax Elements

popup-name	The name of the pop-up menu. This name is typically shown in the menu bar. It is a character string in double quotes. The pop-up name also indicates which character in the menu item is to serve as the menu's mnemonic.

The item text string can also include the following escape codes: \a and \t. \t should be used only within a POPUP definition and not for items in the main menu bar. It inserts a tab in the item text aligning the text. The \a escape code aligns the following text flush right.

popup-attributes	One or more keywords that describe the pop-up menu's state (active, inactive, grayed, checked, etc.).The keywords GRAYED and INACTIVE are mutually exclusive. Other keywords can be used together by combining their values with a bitwise OR.

GRAYED	Item is unavailable for selection.

INACTIVE	Item is never available for selection.

CHECKED	Checkmark appears next to item. Not supported for top-level menu items.

HELP	Appears on right side of menu bar.

MENUBREAK	Item begins a new menu column.

MENUBARBREAK	Item begins a new menu row.

item-definitions	One or more MENUITEM or POPUP definitions. The MENUITEM definition specifies individual menu items, and the POPUP definition describes a pop-up menu.

Remarks

POPUP contains a number of MENUITEM definitions, which specify the individual items in the pop-up menu.

POPUP can be used only within a MENU definition.

Example

In this example, when the user selects the File menu, the menu "drops-down" (because of the POPUP statement) and displays all the options on the menu.

The ampersand (&) underlines the letter that immediately follows it. This lets the user choose the command from the menu by typing that letter.

mainmenu MENU PRELOAD

BEGIN

  POPUP      "&File"

  BEGIN

    MENUITEM "&New", 100

    MENUITEM "&Open", 101

    MENUITEM "&Close", 102, GRAYED

    MENUITEM "&Save", 103

    MENUITEM "Save &As", 104

    MENUITEM SEPARATOR

    MENUITEM "&Print", 105

    MENUITEM "&Draft Printing", 107, CHECKED

    MENUITEM SEPARATOR

    MENUITEM "E&xit", 106

  END

  MENUITEM "&Help", 200

END


PUSHBUTTON

Description

A DIALOG definition that places a push button control in a dialog box.

Syntax

PUSHBUTTON text, control-ID, x, y, width, height, [c-style]

Syntax Elements

text	A text string in double quotes. This text is displayed inside the button area. It can be specified as a keyboard accelerator mnemonic.

control-ID	A numeric identifier for this control. This number must be a unique integer. The control ID is used by Windows to indicate which control has been selected.

x, y	Horizontal and vertical positions of the button relative to the dialog window in which it appears. These numbers are specified in dialog units.

width, height	The width and height of the control. These numbers are specified in dialog units.

c-style	The control style constant (an unsigned long integer value that is interpreted as a series of bit flags). Constants can be combined with a bitwise OR to apply multiple styles to the control. The field can  contain any of the window style constants.

WS_TABSTOP

WS_DISABLED

WS_GROUP

and any combination of the BUTTON class style constants. The default styles are BS_PUSHBUTTON and WS_TABSTOP.

Remarks

A push button is a square button containing text describing its action. It is a member of the button class.

PUSHBUTTON is valid only within a DIALOG definition.

Example

PUSHBUTTON "OK", 108, 15, 55, 24, 14


RADIOBUTTON

Description

A DIALOG definition that places a radio button control in a dialog box.

Syntax

RADIOBUTTON text, control-ID, x, y, width, height, [c-style]

Syntax Elements

text	A text string in double quotes. This text is displayed next to the button. It can be specified as a keyboard accelerator mnemonic.

control-ID	A numeric identifier for this control. This number must be a unique integer. The control ID is used by Windows to indicate which control has been selected.

x, y	Horizontal and vertical positions of the button relative to the dialog window in which it appears. These numbers are specified in dialog units.

width, height	The width and height of the control. These numbers are specified in dialog units.

c-style	The control style constant (an unsigned long integer value that is interpreted as a series of bit flags). Constants can be combined with a bitwise OR to apply multiple styles to the control. The field may contain the window style constants

WS_DISABLED

WS_GROUP

WS_TABSTOP

and any combination of the BUTTON class style constants.. The default styles are BS_RADIOBUTTON and WS_TABSTOP.

Remarks

A radio button is a round button with text to the left or right of the button describing the button's meaning. Normally text is displayed to the right of the button. You can change this to the left side with the appropriate c-style.

Radio buttons maintain a state: They are either checked or unchecked. A checked radio button has a small black circle within the outer circle to show that it is checked. Radio buttons require application program intervention to maintain their state. To simplify programming, use the auto-radio button which is defined with the CONTROL definition.

A radio button is a member of the button class. When the user presses the mouse button in the control's area, the button is highlighted. When the mouse button is released, the radio button is returns to normal, and a message is sent to the parent window indicating that the button was pressed.

Never perform any action that changes the keyboard focus (or for that matter any action which toggles the state of the application) in response to the BN_CLICKED message, since a radio button sends this notification each time it receives the keyboard focus.

RADIOBUTTON is valid only within a DIALOG definition.


RCDATA

Description

A multiple-line statement that lets the user include any type of data directly in the .RC file.

Syntax

resource-name RCDATA [load-type] [memory-option]

BEGIN

  resource-data

END

Syntax Elements

resource-name	The text identifier or numeric ID for this resource. The identifier or number must be unique. Numeric IDs must be integers.

load-type	Specifies when the resource is loaded into memory.

memory-option	Specifies how the resource is loaded into memory.

resource-data	One or more lines of data in standard C language format. Data can consist of any mix of numeric values and strings. Numeric values can be represented in hex, octal, or decimal. Strings are placed inside double quotation marks. String values are not automatically null terminated. To terminate a string with a null character, simply include a \0 at the end of the string.

Remarks

The resource data is associated with the specified resource name, and is included in the executable file for access at runtime.

Example

These examples show you the variety of data you can include in a raw data resource:

// a single string (not null-terminated)

mystring RCDATA PRELOAD

BEGIN

  "Now is the time."

END

// a bunch of data

mydata RCDATA

BEGIN

  0x1000,

  255,

  "Null-terminated string\0",

  0777,

END


RCINCLUDE

A directive that causes Resource Workshop to open the named source file and process directives and resource definitions contained in that file.

Syntax

rcinclude filename

Syntax Elements

filename	Can be absolute or relative to the current directory. The INCLUDE environment path is not searched for files which are rcincluded.

Remarks

rcinclude directives can be nested up to 19 levels. Note, however, that the Microsoft Resource Compiler does not support nested rcinclude statements. Therefore, if Microsoft source compatibility is desired, do not nest rcinclude statements.

The rcinclude keyword is not case sensitive: rcinclude, RCINCLUDE, and RcInClUde are all processed identically by Resource Workshop.

Example

RCINCLUDE SEARCH.DLG


RTEXT

Description

A DIALOG definition that defines right-justified static text in a dialog box.

Syntax

RTEXT text, control-ID, x, y, width, height, [c-style]

Syntax Elements

text	A text string, enclosed in quotes, that appears in the dialog window. It can be specified as a keyboard accelerator mnemonic.

A common Windows programming technique is to label an edit control by preceding it with a static text control. The label contains a mnemonic for the edit field, such as "&Name". If the CTEXT control does not use the window style constant WS_TABSTOP, Windows sets the focus in the next control.

control-ID	A numeric identifier for this control. This number can be a unique integer. The control ID is used by Windows to indicate which control has been selected. If there is no need to refer to the control at runtime (as is most often the case with static controls), this field is by convention set to -1 to document that it is truly static.

x, y	Horizontal and vertical positions of the text relative to the dialog window in which the text appears. These numbers are specified in dialog units.

width, height	The size of the control in dialog units. The static text appears centered within the specified area.

c-style	The control style constant (an unsigned long integer value that is interpreted as a series of bit flags).  More than one control style can be combined using a bitwise OR. The window style WS_GROUP is always set for static text. The default style is the STATIC style constant SS_RIGHT and the window style WS_GROUP.

Remarks

RTEXT specifies a text string, its attributes, and where it is located in the window. The text is aligned flush right within the specified rectangle. If the text is too wide to fit within the rectangle, it automatically wraps.

This definition can only appear within a DIALOG definition.

Example

This example creates a disabled control 93 dialog units wide and 8 dialog units high. The left corner of the rectangular control begins at coordinates 104,4. The text "Version 3.10" is flush right within the rectangle.

RTEXT "Version 3.10", 104, 4, 60, 93, 8, WS_DISABLED

See Also

CTEXT

LTEXT


SCROLLBAR

Description

A DIALOG definition that defines a scroll bar, a rectangular control with direction arrows on both ends and a movable scroll box.

Syntax

SCROLLBAR control-ID, x, y, width, height, [c-style]

Syntax Elements

control-ID	A numeric identifier for this control. This number must be a unique identifier. The control-ID is used by Windows to indicate which control has been selected.

x, y	Horizontal and vertical position of the scroll bar control relative to the dialog window in which it appears. These numbers are specified in dialog units.

width, height	The size of the control in dialog units.

c-style	The control style constant (an unsigned long integer value that is interpreted as a series of bit flags). Constants may be combined with a bitwise OR to apply multiple styles to the control. The field can combine any of the window style constants

WS_DISABLED

WS_GROUP

WS_TABSTOP

and any of the SCROLLBAR class style constants. The default style is SBS_HORZ.

Remarks

A scroll bar can appear anywhere in a window. When the user clicks the control with a mouse, a message is sent to the parent window.

SCROLLBAR belongs to the SCROLLBAR class.

Example

SCROLLBAR 102, 13, 15, 17, 64, SBS_VERT | SBS_TOPALIGN


STRINGTABLE

Description

A multiple-line statement that specifies null-terminated ASCII strings that can be accessed by the program.

Syntax

STRINGTABLE [load-type] [memory-option]

BEGIN

  string-ID, string

END

Syntax Elements

load-type	Specifies when the resource is loaded into memory.

memory-option	Specifies how the resource is loaded into memory.

string-ID	A user-assigned integer value that identifies the string. Each string ID must be unique. The string ID is used at runtime by the LoadString function to determine which string is being requested by the program.

string	An ASCII string in standard C language format.

Remarks

Each string is assigned a unique unsigned short integer string ID. Strings are read in for access at run time by calling the LoadString function with the desired string ID.

The string table mechanism is a convenient method to keep text strings separate from code for easy update and possible translation into foreign languages.

Although string IDs must be numeric, the #define preprocessor directive can be used to simplify access by the program. (See the second example.)

Example

This example lists strings an application might use for displaying messages to the user:

STRINGTABLE

BEGIN

  1,  "Press any key to continue..."

  2,  "Click mouse to continue..."

  3,  "All rights reserved"

  4,  "Disk Full"

END

To use the #define, set up the .H file with the proper #define statements. This example calls the file STRNAMES.H.

#define PressKey    1

#define PressMouse  2

#define AllRights   3

#define DiskFull    4

Then in the .RC file:

#include strnames.h

/* a single table with defines */

STRINGTABLE

BEGIN

  PressKey,   "Press any key to continue..."

  PressMouse, "Click mouse to continue..."

  AllRights,  "All rights reserved"

  DiskFull,   "Disk Full"

END


User-defined resources (Resource Script)
User-defined resources

Description

Associates a file containing user-defined resource data with a resource name and a type ID.

Syntax

resource-name type-ID [load-type] [memory-option] filename

Syntax Elements

resource-name	The text identifier or numeric ID for this resource. The identifier or number must be unique within each user-defined resource type. Numeric IDs must be integers.

type-ID	The type-identifier for the custom resource type. This type identifier should be a text identifier or an integer number. User-defined type identifier numbers must be greater than 255. (Numbers 1 to 255 are reserved by Resource Workshop for predefined resource types and future expansion.)

load-type	Specifies when the resource is loaded into memory.

memory-option	Specifies how the resource is loaded into memory.

filename	The name of the DOS file containing the user data. A full path name can be used to specify files which are not in the current working directory. The data in the specified file is included in the current project.

Remarks

This user-defined resource definition includes data from the specified file in the current project.

This definition can also use the syntax of RCDATA.

Example

In the first example, the new resource type is DEFAULTS  and it is named "defdata". The new resource is in the file DFLT.RES.

defdata DEFAULTS dflt.res

In this example, the resource type is 256 and it is named "printertype". The resource is in the file PRTYP.RES. The resource can be moved around in memory and then removed from memory when the application no longer needs it.

printertype 256 MOVEABLE DISCARDABLE prtyp.res


Constants overview
Constants

Here are the predefined constants:

Control window style constants

Dialog window style constants

Window style constants


Window style constants

Here are the predefined constants for window styles.

Style	Description

WS_BORDER	Window has a thin border (1 pixel wide on EGA and VGA displays).

WS_CAPTION	Window has a title bar and thin border, unless WS_EX__DLGMODALFRAME is set in CreateWindowEx (see DS_MODALFRAME).

WS_CHILD	Window is a child window. All controls within a dialog box have this style. This style cannot be used with WS_POPUP or WS_OVERLAPPED.

WS_CLIPCHILDREN	When the programmer obtains a device context for this window using either the GetDC or BeginPaint functions, the device context's clipping region excludes the area(s) occupied by any child window(s). If this style is not set for a window, it's possible for a parent to paint over one or more of its child windows.

This style is not normally applicable to dialog windows because the user program does not usually paint within a dialog window, leaving that function to the Windows dialog manager.

WS_CLIPSIBLINGS	When the programmer obtains a device context for this window using either the GetDC or BeginPaint functions, the device context's clipping region excludes the area(s) occupied by any sibling child window(s). This style requires the use of WS_CHILD. If this style is not set for a window, it is possible for a child to paint over one or more of its sibling windows.

This style is not normally applicable to dialog controls, because the user program does not usually paint within a dialog window, leaving that function to the Windows dialog manager.

WS_DISABLED	Window is disabled at the time of creation. No user input is allowed in the window, thus the control cannot be selected using the keyboard or mouse. For some controls, this style causes the text for the control to be grayed.

This style can be changed at runtime by calling the EnableWindow function.

WS_DLGFRAME	Window has a double border and no title bar.

This style was standard for Windows 2 dialogs windows. Windows 3 dialogs windows, by convention, use the WS_CAPTION, WS_SYSMENU, and DS_MODALFRAME styles. The Windows 3 convention lets a user move the dialog window in order to see the information underneath.

WS_GROUP	This style is used to group controls for user access with the arrow keys. WS_GROUP is a start of group marker. Only the first control in each group should have the WS_GROUP flag set. The next group begins with the next WS_GROUP.

Because this style flag has the same numeric value as WS_MAXIMIZEBOX, it can only be used with child windows.

WS_HSCROLL	Window has a horizontal scroll bar along the bottom of the window.

The WS_HSCROLL style should not be confused with a scroll bar control. A scroll bar control is an independent child window, which can be moved anywhere within its parent's client area, while the WS_HSCROLL creates a scroll bar that is part of the window's frame (also called non-client area).

WS_ICONIC	Window is created initially in the iconic state. This style should only be used for WS_OVERLAPPED windows.

WS_MAXIMIZE	Window is maximized when first shown. This style should only be used for WS_OVERLAPPED windows.

WS_MAXIMIZEBOX	Window contains a maximize button in the title bar. This style should only be used for windows with the WS_CAPTION style.

WS_MINIMIZE	Window is minimized when first shown. This style should only be used for WS_OVERLAPPED windows.

WS_MINIMIZEBOX	Window contains a minimize button in the title bar. This style should only be used for windows with the WS_CAPTION style.

WS_OVERLAPPED	Window is a top-level window. Usually used for the main window of an application. This style cannot be used with WS_POPUP, or WS_CHILD styles.

WS_OVERLAPPEDWINDOW	Window has WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, and WS_THICKFRAME attributes.

WS_POPUP	Window is the pop-up type. Cannot be used with WS_CHILD or WS_OVERLAPPED styles.

WS_POPUPWINDOW	Window has WS_POPUP, WS_BORDER, and WS_SYSMENU attributes.

WS_SIZEBOX	Window has a thick frame. Valid only for windows with scroll bars or a title bar.

WS_SYSMENU	Window has a system menu in the title bar. Valid only for windows with title bars (WS_CAPTION style).

WS_TABSTOP	This style indicates that when the user presses Tab in a preceding control, the input focus changes to this control. Controls without this style can still be activated using the mouse, or using the arrow keys, if part of a group.

WS_THICKFRAME	Window has a thick frame and can be sized by the user.

WS_VISIBLE	Window is visible when created. All controls within a dialog have this style by default.

WS_VSCROLL	Window contains a vertical scroll bar at its left side. The WS_VSCROLL style should not be confused with a scroll bar control. A scroll bar control is an independent child window, which can be moved anywhere within its parent's client area, while the WS_VSCROLL style creates a scroll bar that is part of the window's frame (also called non-client area).


Dialog window style constants

Here are the predefined constants for dialog window styles.

Style	Description

DS_ABSALIGN	This style indicates that the x- and y-coordinates specified for the window's position are relative to the screen's origin rather than to the parent or owner window.

DS_SYSMODAL	Make a system modal window. No other windows can be selected by the user when this window is displayed.

DS_LOCALEDIT	Storage for edit text controls (class "edit") is, by default, allocated in the global heap. By using DS_LOCALEDIT, you  can force the Windows dialog manager to create the edit text controls in such a way that the storage is allocated on the local heap of the module whose instance handle is passed to the dialog manager in the call to DialogBox or CreateDialog.

If you want to use the EM_SETHANDLE or EM_GETHANDLE messages in the dialog hook or window function, you must use this style.

DS_SETFONT	This style must be set by a resource compiler for a dialog window that contains the optional font data in the dialog binary data structure. Because it is set by the resource compiler, it must never be used by a user.

DS_MODALFRAME	This style is used in conjunction with WS_CAPTION to create a movable but unsizeable window with a caption and a modal dialog frame for the lower three borders instead of a thin border.

DS_NOIDLEMSG	When a modal dialog box is displayed by an application, Windows periodically sends the dialog's owner window function WM_ENTERIDLE messages. If for some reason, a programmer wants to suppress these messages, use this style.


Control window style constants

Here are the predefined constants for control window styles.

BUTTON class style constants

COMBOBOX class style constants

EDIT class style constants

LISTBOX class style constants

SCROLLBAR class style constants

STATIC class style constants


BUTTON class style constants

Here are the predefined constants for the BUTTON class style.

Style	Description

BS_3STATE	A checkbox with three states: checked, not checked, and grayed. When the user clicks on the control, Windows sends a BN_CLICKED message to the control's parent window indicating that the button has been clicked.

BS_AUTO3STATE	A checkbox with three states: checked, not checked, and grayed. When the user clicks the mouse button on the control, the button automatically toggles to the next state. Windows sends a BN_CLICKED message to the control's parent window indicating that the button has been clicked.

BS_AUTOCHECKBOX	A checkbox with two states: checked and not checked. When the user clicks the mouse button on the control, the button automatically toggles to the next state. Windows sends a BN_CLICKED message to the control's parent window indicating that the button has been clicked.

BS_AUTORADIOBUTTON	A radio button that toggles automatically. When the user clicks on the button, it is checked and other buttons in the group are unchecked. Windows notifies the control's parent window, indicating that the button has been clicked (BN_CLICKED).

BS_CHECKBOX	A checkbox with two states: checked and not checked. When the user clicks on the control, Windows sends a BN_CLICKED message to the control's parent window indicating that the button has been clicked.

BS_DEFPUSHBUTTON	Default push button. This style of control is a push button with a heavy border. The heavy border informs the user that this button is the default action for the window, when the Enter key is pressed. A BN_CLICKED message is sent to the parent window when the user clicks the mouse or presses Spacebar inside the button area.

Only one button of this type should be used in a dialog window, and you should be give it the control ID IDOK (1).

BS_LEFTTEXT	This style indicates that the control's text name should be displayed to the left of the button, rather than the default right-hand side.

This style can be used with check boxes,  BS_3STATE and BS_AUTO3STATE check boxes, and radio buttons.

BS_OWNERDRAW	A button drawn by its owner (parent) window.

BS_PUSHBUTTON	Push button. This style of control is a rectangle containing text, with a rectangular border. A BN_CLICKED message is sent to the parent window when the user clicks the mouse or presses Spacebar inside the button area.

With some display drivers the control is partially filled with gray, giving the button a shaded appearance.

BS_RADIOBUTTON	Radio button. When the user clicks on the button, Windows notifies the control's parent window, indicating that the button has been clicked (BN_CLICKED). When using radio buttons, you must use the CheckRadioButton function to select and deselect radio buttons within a group when the BN_CLICKED notification is sent to the parent window or dialog function.


COMBOBOX class style constants

Here are the predefined constants for the COMBOBOX class style.

Style	Description

CBS_AUTOHSCROLL	A combo box that scrolls the text in the edit control. When a user enters text beyond the boundary of the rectangle, the text will scroll.

CBS_DISABLENOSCROLL	A combo box with a disabled vertical scroll bar when the list box doesn't contain enough items to scroll. If this style is not used, the scroll bar won't be displayed.

CBS_DROPDOWN	A combo box with a list box displayed only when the user selects the drop-down arrow next to the edit control. The edit control displays the current selection.

CBS_DROPDOWNLIST	A combo box with a list box with a static text item instead of an edit control that displays the current selection. The list box is displayed only when the user selects the drop-down arrow next to the static text.

CBS_HASSTRINGS	An owner-draw combo box with a list box containing items made up of strings. Memory and pointers for the strings are handled by the combo box. Your application can then use CB_GETTEXT to retrieve the text for a particular string.

CBS_OEMCONVERT	A combo box that converts text typed into the edit control from the ANSI character set to the OEM character set and back again to ANSI. When your application calls the AnsiToOem function to convert an ANSI string to OEM characters, this style ensures characters are converted properly. Usually this style is used for combo boxes that contain filenames. Use CBS_OEMCONVERT only with combo boxes created with the CBS_SIMPLE or CBS_DROPDOWN styles.

CBS_OWNERDRAWFIXED	An owner-draw fixed-height combo box. The list box's owner draws the contents of the list box. Each list box item is the same height.

CBS_OWNERDRAWVARIABLE	An owner-draw variable-height combo box. The list box's owner draws the contents of the list box. List box items can be of variable heights.

CBS_SIMPLE	A combo box with the list box always displayed. It's edit control displays the list box's current selection.

CBS_SORT	A combo box that sorts all the items displayed in the list box.


EDIT class style constants

Here are the predefined constants for the EDIT class style.

Style	Description

ES_AUTOHSCROLL	Automatic horizontal scroll. When this style is specified and the user enters more text than will fit in the control's rectangle, the text is automatically scrolled. Scrolling occurs 10 characters at a time. If automatic horizontal scrolling is not specified and ES_MULTILINE is specified, text will automatically wrap to the next line when the right side of the control's rectangle is reached.

The EM_LIMITTEXT message can be used by to place an absolute limit on the number of characters allowed in the edit text control.

ES_AUTOVSCROLL	Automatic vertical scroll. Text is scrolled vertically when the user presses the Enter key on the last line of text which fits in the control's rectangle. Scrolling occurs one page at a time. (A page is defined as the number of lines visible in the edit text control.) If automatic vertical scrolling is not specified, the control will beep if the user attempts to enter more lines than will fit in the control.

Note that the ES_LIMITTEXT message can be used by the programmer to place an absolute limit on the number of characters allowed in the edit text control.

ES_CENTER	Edit text is centered horizontally in control's rectangle.

The ES_MULTILINE style must be set for this style to have any effect on the appearance of the text.

ES_LEFT	Edit text is aligned flush left.

ES_LOWERCASE	Edit text is converted to lower case.

ES_MULTILINE	Edit text can occupy more than one line in the control's rectangle. The number of lines allowed by the control is determined by the size of the control's client area.

The ES_MULTILINE flag can be used with ES_AUTOVSCROLL and ES_AUTOHSCROLL to make an automatically scrolling window. Additionally, the WS_HSCROLL and WS_VSCROLL styles can be specified to give manual scrolling ability to the control. In such cases, the edit control manages its own scrolling, with no intervention required. If the edit control has no scroll bars, scrolling can be managed by sending the control WM_HSCROLL and WM_VSCROLL messages.

ES_NOHIDESEL	No hide selection. Normally text selected in an edit text control is highlighted only when the control has the input focus. The ES_NOHIDESEL flag specifies that the selected text in edit control remains highlighted even when the control doesn't have the input focus.

ES_OEMCONVERT	Edit text is converted from the ANSI character set to the OEM character set and back again to ANSI. When your application calls the AnsiToOem function to convert an ANSI string to OEM characters, this style ensures characters are converted properly. Usually this style is used for combo boxes that contain filenames.

ES_PASSWORD	Edit text is displayed as an asterisk (*) as it's typed in.

ES_READONLY	Edit text is read only; the user can't enter or edit text.

ES_RIGHT	Edit text is aligned flush right. The text ends at the right side of control's rectangle.

Note that the ES_MULTILINE style must be set for this style to have any effect on the appearance of the text.

ES_UPPERCASE	Edit text is converted to upper case.

ES_WANTRETURN	When the user presses Enter, ES_WANTRETURN puts Enter in the edit buffer, rather than performing the action for the default key. This style applies to multiline text only.


LISTBOX class style constants

Here are the predefined constants for the LISTBOX class style.

Style	Description

LBS_DISABLENOSCROLL	A list box with a disabled vertical scroll bar when the list box doesn't contain enough items to scroll. If this style is not used, the scroll bar won't be displayed.

LBS_EXTENDEDSEL	A list box with multiple items that are selected using the SHIFT key and the mouse or special key combinations.

LBS_HASSTRINGS	An owner-draw list box that contains string items. The list box maintains the memory and pointers for the string items. The LB_GETTEXT message retrieves the text for a particular item.

LBS_MULTICOLUMN	A multicolumn list box that is scrolled horizontally. The LB_SETCOLUMNWIDTH message sets the width of the columns.

LBS_MULTIPLESEL	A list box where more than one string in the list box can be selected.

LBS_NOINTEGRALHEIGHT	A list box that is not resized when partial items are displayed. Its size is exactly the size specified by the application when it created the list box.

LBS_NOREDRAW	The content of the list box is not redrawn when a change is made. This setting can be changed at runtime by sending a WM_SETREDRAW message to the control.

LBS_NOTIFY	Notifies the parent window when the user clicks or double clicks in a control.

LBS_OWNERDRAWFIXED	A list box where the owner is responsible for drawing the contents of the list box. The items in the list box are the same height. The owner window receives a WM_MEASUREITEM message when the list box is created. When a visual aspect of the list box changes, the owner window receives a WM_DRAWITEM message .

LBS_OWNERDRAWVARIABLE	A list box where the owner is responsible for drawing the contents of the list obx. The items in the list box are variable in height. The owner window receives a WM_MEASUREITEM message when the list box is created. When a visual aspect of the list box chnages, the owner windows receives a WM_DRAWITEM message.

LBS_SORT	Strings in the list box are displayed in alphabetical order.

LBS_STANDARD	Strings in the list box are displayed in alphabetical order and parent window receives an input message when the user clicks or double-clicks a string. There are borders on all sides of the list box.

LBS_USETABSTOPS	Allows a list box to recognize and expand tab characters when drawing its strings. The default tab positions are 32 dialog units.

LBS_WANTKEYBOARDINPUT	When the list box has the focus and a user presses a key, the owner of the list box receives a WM_VKEYTOITEM or a WM_CHARTOITEM message. The application can perform special processing on the keyboard input.


SCROLLBAR class style constants

Here are the predefined constants for the SCROLLBAR class style.

Style	Description

SBS_BOTTOMALIGN	The scroll bar appears the standard height, aligned with the bottom side of the control's rectangle. Valid for horizontal scroll bars only.

SBS_HORZ	Horizontal scroll bar. If SBS_BOTTOMALIGN or SBS_TOPALIGN is not specified, the scroll bar occupies the control's client area.

SBS_LEFTALIGN	The scroll bar appears the standard width, aligned with the left side of the control's rectangle. Valid for vertical scroll bars only.

SBS_RIGHTALIGN	The scroll bar appears the standard width, aligned with the right side of the control's rectangle. Valid for vertical scroll bars only.

SBS_SIZEBOXTOPLEFTALIGN	The size box appears the standard size, aligned in the upper left corner of the control's rectangle. Valid for size boxes only.

SBS_SIZEBOX	Size box. If SBS_SIXEBOXTOPLEFTALIGN or SBS_SIZEBOXBOTTOMRIGHTALIGN is not specified, the size box occupies the control's client area.

SBS_SIZEBOXBOTTOMRIGHTALIGN	The size box appears the standard size, aligned in the lower right corner of the control's rectangle. Valid for size boxes only.

SBS_TOPALIGN	The scroll bar appears the standard height, aligned with the top side of the control's rectangle. Valid for horizontal scroll bars only.

SBS_VERT	Vertical scroll bar. If SBS_RIGHTALIGN or SBS_LEFTALIGN is not specified, the scroll bar occupies the control's client area.


STATIC class style constants

Here are the predefined constants for the STATIC class style.

Style	Description

SS_BLACKFRAME	Static item's rectangle; displayed with a frame in the system color COLOR_WINDOWFRAME.

SS_BLACKRECT	Static item's rectangle; filled with the system color COLOR_WINDOWFRAME.

SS_CENTER	Static item is text displayed centered in the control's rectangle. Text too long to fit is automatically wrapped to the next line.

SS_GRAYRECT	Static item's rectangle; filled with the system color COLOR_BACKGROUND.

SS_GRAYFRAME	Static item's rectangle; displayed with a frame in the system color COLOR_BACKGROUND.

SS_LEFT	Static item is text displayed left justified in the control's rectangle. Text too long to fit is automatically wrapped to the next line.

SS_RIGHT	Static item is text displayed right justified in the control's rectangle. Text too long to fit is automatically wrapped to the next line.

SS_WHITEFRAME	Static item's rectangle; displayed with a frame in the system color COLOR_WINDOW.

SS_WHITERECT	Static item's rectangle is filled with the system color COLOR_WINDOW.


Alphabetical Listing of Resource Workshop Errors

This is an alphabetical listing of all Resource Workshop errors. For a functional listing of errors, go to the Functional Listing of Resource Workshop Errors Help screen.

#define is used. Delete anyway?

#define text too long

'#else' before '#if'

'#endif' before '#if'

#error directive encountered: <error message>

#undef is not supported

<filename> does not exist

<filename> does not exist. Create?

<filename> exists. Overwrite?

<filename> exists. Replace resources?

<filename> has changed. Save?

<filename> is not a valid file name or path

A compile is in progress in another instance

A MENU or POPUP must have at least one item

A resource of that name already exists

Allocate failed

An ACCELERATORS table must have at least one item

An image of this size and color attributes exists. Continue anyway?

Ascent must be less than character height

Bad character in source input

Binary too large

Cannot add a new RES or program file to an RC project

Cannot add <filename> to project twice

Cannot convert Windows 2 image: file is read-only

Cannot delete last item or pop-up

Cannot determine format from extension

Cannot duplicate a stringtable

Cannot edit vector fonts

Cannot find resource

Cannot open file: <filename>

Cannot rename a stringtable

Cannot save to a running program

Change reference in <filename> from <reference> to <new reference>?

Character set must be from 0 to 255

Character width must be from 1 to maximum width

Command line parameter error

Compile initialization failed

Conflicting memory options

Constant is used. Delete anyway?

Could not allocate memory

Could not allocate undo for delete

Could not allocate undo for duplicate

Could not allocate undo for memory options

Could not allocate undo for new

Could not allocate undo for rename

Could not create bitmap

Could not create identifier

Could not create icon image

Could not open file

Could not create resource

Create a new identifier: <identifier name>?

Custom control library entry points missing from this library

#define is used. Delete anyway?

#define text too long

Delete Resource: <resource name>

Device dependent bitmap does not match current display. Cannot convert

Division by zero is not allowed

Duplicate command value found

Duplicate IDs not allowed

Duplicate key value found

'#else' before '#if'

'#endif' before '#if'

Entry too large

#error directive encountered: <error message>

Expecting ')'

Expecting #define identifier

Expecting a number or '('

Expecting BEGIN

Expecting caption: quoted string or unsigned integer

Expecting class name or ID

Expecting constant expression

Expecting control window style

Expecting END

Expecting filename

Expecting filename in quotes

Expecting filename or BEGIN

Expecting HEXSTRING (hex digits surrounded by single quotes)

Expecting identifier

Expecting interface keyword

Expecting menu text (quoted string) or SEPARATOR

Expecting quoted string

Expecting resource ID or name

Expecting resource type ID or name

Expecting resource name or resource type name

Expecting semicolon

Expecting unit keyword

Expecting unsigned long integer

Expecting unsigned short integer

Expecting signed long integer

Expecting signed short integer

Expecting window rectangle (4 signed integers)

Expression stack overflow

External leading must be from 0 to 65535

Field too large

<filename> does not exist

<filename> does not exist. Create?

<filename> exists. Overwrite?

<filename> exists. Replace resources?

<filename> has changed. Save?

<filename> is not a valid file name

File <filename> does not exist

File create

File extension: <.EXT> does not match the standard: <EXT> Continue anyway?

File IO error

File is not a dynamic link library

File read failed

File seek failed

File write failed

Fill area too complex. Some portions were not filled.

Font family must be from 0 to 15

Font is too large to save in Version 2 format! (>64K)

Font weight must be from 1 to 1000

Fonts must have numeric resource IDs

Height must be from 1 to 32767

HEXSTRING over 255 bytes long

Horizontal resolution must be from 1 to 65535

Identifier already exists

Identifier is used as a literal

Image colors exceed device capabilities. Changes will not be saved.

Incomplete expression

Incorrect resource compiler version

Info function returned a bad Handle

Info function return a NULL Handle

Input reset failed

Input source stack overflow

Internal leading must be less than character height

Internal software error

Invalid accelerator key value

Invalid accelerator option

Invalid bitmap format

Invalid cursor format

Invalid escape sequence

Invalid file format

Invalid font format

Invalid font specification

Invalid icon format

Invalid menu option

Invalid number of rows or columns

Invalid preprocessor directive

Invalid stretch parameters

Invalid value in HEXSTRING

Macro parameter substitution is not supported

Maximum height is 32767

Maximum of 255 controls

Maximum width is 32767

Memory allocation error during decompile

Memory lock failed

Memory unlock failed

Menu too large to edit

Must be first token on a line

Must be within character range

New field instance failed

New symbol failed

No duplicate command values found

No duplicate key values found

No resources in this file

Not a positive short integer

Not a valid identifier

Not a valid identifier name

Not a valid resource name

Not enough memory to edit this bitmap

Not implemented

Number of undo levels must be > 1 and < 100

Parser stack overflow

PASCAL string over 255 bytes

Pascal string too long

Pascal syntax error (unrecognized token)

Please close a window

Please enter a name

Please enter a valid filename

Please enter a valid number

Points must be from 1 to 65535

Preprocessor directives not allowed

Remove contents of <filename> from this project?

Resource already exists

Resource binary too large

Resource editor initialization error

Resource has changed. Compile? WARNING: Changes will be discarded if you answer no!

Resource is too large to edit as text

Resource of that name/ID, and type already exists

Resource type already exists

Software error!

Source input stack overflow (too many nested includes?)

String ID is already used

Symbol already defined

Syntax error

System resources low. Please close some files or applications.

Table too large to edit

Token is too large for scanner (unbalanced quotes?)

Too many controls

Too many digits in a number

Too many items to paste

Too many items to view.

Too much data for 1 field

#undef is not supported

Unexpected end of file

Unexpected const keyword

Unexpected file format

Unexpected NULL pointer encountered

Unexpected operator

Unknown bitmap format

Unreleased version format

Value is out of range

VBuff allocation error

VBuff lock error

Vertical resolution must be from 1 to 65535

Virtual buffer allocation

Virtual buffer lock

Virtual table allocation failed

Virtual table create

Virtual table get

Virtual table lock

Virtual table put

Virtual table read

Virtual table write

VTMgr allocation error

VTMgr lock error

WARNING! This DLL may or may not be a valid custom control library. If it is not, a system crash is likely! Do you wish to proceed?

Width must be from 1 to 32767

You cannot undo this action! Select cancel to stop

You cannot use this identifier. It is a keyword, resource type name, or resource name

You have opened a Windows version 2 file.


Functional Listing of Resource Workshop Errors

This is a functional listing of all Resource Workshop errors. For an alphabetical listing of errors, go to the Alphabetical Listing of Resource Workshop Errors Help screen.

Accelerator editor errors

An ACCELERATORS table must have at least one item

Could not allocate undo for duplicate

Duplicate key value found

Height must be from 1 to 32767

No duplicate key values found

Please close a window

You cannot undo this action! Select cancel to stop

Value is out of range

Width must be from 1 to 32767

Compiler errors

#define text too long

'#else' before '#if'

'#endif' before '#if'

#undef is not supported

A compile is in progress in another instance

Bad character in source input

Binary too large

Cannot open file: <filename>

Compile initialization failed

Division by is zero not allowed

#error directive encountered: <error message>

Expecting ')'

Expecting #define identifier

Expecting a number or '('

Expecting BEGIN

Expecting caption: quoted string or unsigned integer

Expecting class name or ID

Expecting constant expression

Expecting control window style

Expecting END

Expecting filename

Expecting filename in quotes

Expecting filename or BEGIN

Expecting HEXSTRING (hex digits surrounded by single quotes)

Expecting identifier

Expecting interface keyword

Expecting menu text (quoted string) or SEPARATOR

Expecting quoted string

Expecting resource ID or name

Expecting resource type ID or name

Expecting resource name or resource type name

Expecting semicolon

Expecting signed long integer

Expecting signed short integer

Expecting unit keyword

Expecting unsigned long integer

Expecting unsigned short integer

Expecting window rectangle (4 signed integers)

Expression stack overflow

Field too large

File IO error

HEXSTRING over 255 bytes long

Incomplete expression

Incorrect resource compiler version

Input reset failed

Invalid accelerator key value

Invalid accelerator option

Invalid bitmap format

Invalid cursor format

Invalid escape sequence

Invalid font format

Invalid font specification

Invalid icon format

Invalid menu option

Invalid preprocessor directive

Invalid value in HEXSTRING

Macro parameter substitution is not supported

Must be first token on a line

No resources in this file

Not a positive short integer

Parser stack overflow

PASCAL string over 255 bytes

Pascal string too long

Pascal syntax error (unrecognized token)

Please enter a valid filename

Source input stack overflow (too many nested includes?)

Symbol already defined

Syntax error

Token is too large for scanner (unbalanced quotes?)

Too many controls

Too many digits in a number

Too much data for 1 field

Unexpected const keyword

Unexpected end of file

Unexpected operator

You have opened a Windows version 2 file.

Dialog editor errors

Could not allocate undo for duplicate

Custom control library entry points missing from this library

File is not a dynamic link library

Height must be from 1 to 32767

Info function returned a bad Handle

Info function return a NULL Handle

Invalid number of rows or columns

Maximum of 255 controls

Please close a window

Too many items to paste

Value is out of range

WARNING! This DLL may or may not be a valid custom control library. If it is not, a system crash is likely! Do you wish to proceed?

You cannot undo this action! Select cancel to stop

Width must be from 1 to 32767

File management errors

Cannot add a new RES or program file to an RC project

Cannot add <filename> to project twice

Cannot determine format from extension

Cannot save to a running program

Change reference in <filename> from <reference> to <new reference>?

Command line parameter error

Could not open file

<filename> does not exist

<filename> does not exist. Create?

<filename> exists. Overwrite?

<filename> exists. Replace resources?

<filename> has changed. Save?

<filename> is not a valid file name or path

File <filename> does not exist

File create

File extension: <.EXT> does not match the standard: <EXT> Continue anyway?

File read failed

File seek failed

File write failed

Invalid file format

Remove contents of <filename> from this project?

Unexpected file format

Unreleased version format

Virtual table read

Identifier errors

#define is used. Delete anyway?

Constant is used. Delete anyway?

Could not create identifier

Create a new identifier: <identifier name>?

Identifier already exists

Identifier is used as a literal

Input source stack overflow

New symbol failed

Not a valid identifier

Not a valid identifier name

You cannot use this identifier. It is a keyword, resource type name, or resource name

Internal errors

Internal software error

Not implemented

Software error!

Unexpected NULL pointer encountered

Virtual buffer lock

Virtual table create

Virtual table get

Virtual table lock

Virtual table put

Virtual table write

Memory errors

Allocate failed

Could not allocate memory

Could not allocate undo for delete

Could not allocate undo for memory options

Could not allocate undo for new

Could not allocate undo for rename

Memory allocation error during decompile

Memory lock failed

Memory unlock failed

New field instance failed

System resources low. Please close some files or applications.

Too many items to view.

VBuff allocation error

VBuff lock error

Virtual buffer allocation

Virtual table allocation failed

VTMgr allocation error

VTMgr lock error

Menu editor errors

A MENU or POPUP must have at least one item

Cannot delete last item or pop-up

Could not allocate undo for duplicate

Duplicate command value found

Height must be from 1 to 32767

Menu too large to edit

No duplicate command values found

Please close a window

You cannot undo this action! Select cancel to stop

Value is out of range

Width must be from 1 to 32767

Paint editor errors

An image of this size and color attributes exists. Continue anyway?

Ascent must be less than character height

Cannot edit vector fonts

Character set must be from 0 to 255

Character width must be from 1 to maximum width

Could not allocate undo for duplicate

Could not create bitmap

Could not create icon image

External leading must be from 0 to 65535

Fill area too complex. Some portions were not filled.

Font family must be from 0 to 15

Font is too large to save in Version 2 format!  (>64K)

Font weight must be from 1 to 1000

Fonts must have numeric resource IDs

Horizontal resolution must be from 1 to 65535

Image colors exceed device capabilities. Changes will not be saved.

Internal leading must be less than character height

Invalid stretch parameters

Maximum height is 32767

Maximum width is 32767

Must be within character range

Not enough memory to edit this bitmap

Please close a window

Please enter a valid number

Points must be from 1 to 65535

Unknown bitmap format

Vertical resolution must be from 1 to 65535

You cannot undo this action! Select cancel to stop

Value is out of range

Resource errors

A resource of that name already exists

Cannot convert Windows 2 image: file is read-only

Cannot find resource

Conflicting memory options

Could not create resource

Delete Resource: <resource name>

Device dependent bitmap does not match current display. Cannot convert

Not a valid resource name

Please enter a name

Preprocessor directives not allowed

Resource already exists

Resource binary too large

Resource editor initialization error

Resource has changed. Compile? WARNING: Changes will be discarded if you answer no!

Resource is too large to edit as text

Resource of that name/ID, and type already exists

Resource type already exists

String editor errors

Cannot duplicate a stringtable

Cannot rename a stringtable

Could not allocate undo for duplicate

Duplicate IDs not allowed

Entry too large

Height must be from 1 to 32767

Please close a window

String ID is already used

Table too large to edit

You cannot undo this action! Select cancel to stop

Value is out of range

Width must be from 1 to 32767


Identifier exists
Identifier already exists

The specified identifier already exists. Use a unique name.

Note that C #defines are case-sensitive, but Pascal constants are not.


Memory lock failure
Memory lock failed

Resource Workshop could not lock memory. Exit Resource Workshop immediately, without saving files.


Fonts must have numeric IDs
Fonts must have numeric resource IDs

Font resources cannot have alphanumeric literal names. The FONTDIR resource requires a positive short (16-bit) integer font ID.


Close a window
Please close a window

Only 10 windows can be open at the same time. Close a window.


Duplicate key value found
Duplicate key value found     (Accelerators)

Two entries in an accelerator table have the same key value.


No duplicate key values found
No duplicate key values found     (Accelerators)

No entries in an accelerator table have the same key value.


Invalid number of rows or columns
Invalid number of rows or columns          (Dialog boxes)

The number of rows and columns in the array dialog must be sufficient to hold the number of selected controls.


Too many items to paste
Too many items to paste          (Dialog boxes)

You cannot paste these controls in your dialog box, because it would cause the number of controls in the dialog to exceed 255.


Maximum of 255 controls
Maximum of 255 controls     (Dialog boxes)

This dialog box already contains 255 controls. You cannot add a new control without deleting another control.


File is not a dynamic link library
File is not a dynamic link library     (Dialog boxes)

You selected a file that is not a dynamic link library. When you install a custom control library, the file must be a dynamic link library.


Custom control errors
Custom control errors     (Dialog boxes)

The custom control errors are:

Custom control library entry points missing from this library

Info function returned a NULL handle

Info function returned a bad handle

These errors mean that the specified dynamic-link library does not look like a valid custom control library.


Could not create icon image
Could not create icon image     (Icons)

There is not enough memory to create an icon image. Close one or more applications.


Please close a window
Please close a window     (Icons)

Only 10 windows can be open at the same time. Close a window.


An image of this size and color attributes exists. Continue anyway?
An image of this size and color attributes exists. Continue anyway?     (Icons)

You're trying to create an image that has the same size and color attributes as an existing icon.

Windows will only choose one image when displaying an icon. If there are two of the same size and color attributes, one will never be used.


Not enough memory to edit this bitmap
Not enough memory to edit this bitmap     (Bitmaps)

There is not enough memory to edit this bitmap. Close one or more applications to free up memory.

If that doesn't free enough memory, try opening the bitmap as a bitmap project. If there is still not enough memory to edit the bitmap, you might have to obtain more memory to edit the bitmap.


Unknown bitmap format
Unknown bitmap format     (Bitmaps)

Resource Workshop does not understand this bitmap format. Resource Workshop edits only Windows 3 and OS/2 1.x device-independent bitmaps.

Read the bitmap into the program that produced it and use the clipboard to transfer the image to a new bitmap.


Could not create bitmap
Could not create bitmap     (Bitmaps)

There is not enough memory to create the requested bitmap. Close one or more applications to free up memory.

If that doesn't free enough memory, try opening the bitmap as a bitmap project. If there is still not enough memory to create the bitmap, you might have to obtain more memory to create the bitmap.


Character width must be from 1 to maximum width
Character width must be from 1 to maximum width     (Fonts)

You specified a character width that is greater than the maximum width for this font. Either increase the value in Maximum Width input box in the Font Size Information dialog box or enter a smaller character width.


Must be within character range
Must be within character range     (Fonts)

The default and break characters must be within the values entered in the First input box and the Last input box.

Either change the character range values or change the values in the Default input box and the Break input box.


Cannot edit vector fonts
Cannot edit vector fonts     (Fonts)

Windows 3.0 supports two types of fonts, raster and vector. Resource Workshop's font editor can only edit raster fonts. (Some examples of vector fonts are Roman, Modern, and Script.)


Image colors exceed device capabilities. Changes will not be saved
Image colors exceed device capabilities. Changes will not be saved.     (Paint editor)

You are trying to edit an image with more colors than your device driver supports.

Any changes you make to this image will not be saved by Resource Workshop. To change this image, create another image and use the clipboard to copy this image to the new one.


Please enter a valid number
Please enter a valid number     (Paint editor)

The number you entered is out of the range permitted for this field. The permitted range is 1 to 255.


Fill area too complex. Some portions were not filled.
Fill area too complex. Some portions were not filled.     (Paint editor)

The paint can tool was not able to complete the requested operation. It ran out of memory.


Invalid stretch parameters
Invalid stretch parameters     (Paint editor)

A value entered in the Stretch Selection dialog box was out of range for an integer. Please enter a correct value (-32768->32767).


No duplicate command values found
No duplicate command values found     (Menus)

The command values for this menu and all its pop-ups contain no duplicate values.


Menu too large to edit
Menu too large to edit     (Menus)

The Outline pane for this menu required more than 64K. You must use an external text editor to edit a menu this large.


Duplicate command value found
Duplicate command value found     (Menus)

The item highlighted in the Outline pane contains a command value that duplicates a value in a menu item earlier in the menu list.

If you don't want duplicate values, change this value.


Cannot delete last item or pop-up
Cannot delete last item or pop-up     (Menus)

A menu or pop-up must contain at least one entry.


Table too large to edit
Table too large to edit     (String tables)

The table window for this string table requires more than 64K, which exceeds its capacity.

Use an external text editor to split the string table or edit the table.


Entry too large
Entry too large     (String tables)

The maximum length of a string in a string table is 255 characters.


Duplicate IDs not allowed
Duplicate IDs not allowed     (String tables)

String table IDs must be unique per project. If the duplicate value is not in the table you are editing, it is probably in another table.


Could not allocate memory

Resource Workshop could not obtain memory for an operation. Exit Resource Workshop immediately, without saving files. To free memory for use by Resource Workshop, exit other applications, or run Windows in Enhanced mode.


Memory lock failed

Resource Workshop could not lock memory. Exit Resource Workshop immediately, without saving files.


Memory unlock failed

Resource Workshop could not unlock global memory. Exit Resource Workshop immediately, without saving files.


File create

Resource Workshop could not create a file.

Verify that the specified file does not already exist and that there is sufficient directory or disk space for the file. Retry the operation that caused the error.


Could not open file

Resource Workshop could not open the specified file.

Verify that the file exists. Retry the operation that caused the error.


File seek failed

Resource Workshop failed in seeking to a location in a file.

The file may be corrupted. Retry the operation that caused the error.


File read failed

Resource Workshop could not read the specified file.

Verify that the file exists and is readable. Retry the operation that caused the error.


File write failed

Resource Workshop could not write to the specified file.

Verify that the file exists and can be written to. Retry the operation that caused the error.


Virtual table allocation failed

Resource Workshop could not obtain memory for an operation.

Exit Resource Workshop immediately, without saving files. To free up more memory for use by Resource Workshop, try exiting other applications, or running Windows in Enhanced mode.


Virtual table put

Resource Workshop's internal database is probably corrupt. Exit Resource Workshop immediately, without saving files.


Virtual table read

Resource Workshop could not read the specified file.

Verify that the file exists and is readable. Retry the operation that caused the error.


Virtual table get

Resource Workshop's internal database is probably corrupt. Exit Resource Workshop immediately, without saving files.


Virtual table create

Resource Workshop's internal database is probably corrupt. Exit Resource Workshop immediately, without saving files.


Virtual table write

Resource Workshop could not write to the specified file.

Verify that the file exists and can be written to. Retry the operation that caused the error.


Virtual table lock

Resource Workshop's internal database is probably corrupt. Exit Resource Workshop immediately, without saving files.


Virtual buffer allocation

Resource Workshop could not obtain memory for an operation.

Exit Resource Workshop immediately, without saving files. To free memory for Resource Workshop, exit other applications or run Windows in Enhanced mode.


Virtual buffer lock

Resource Workshop's internal database is probably corrupt. Exit Resource Workshop immediately, without saving files.


Binary too large

A binary data item (resource or field) that is too large for Resource Workshop could not be compiled.


Unexpected NULL pointer encountered

Resource Workshop encountered an unexpected NULL pointer.


Input source stack overflow

Resource Workshop could not open an include or rcinclude file or expand a #define. Too many files are open or too many #defines are nested.


Cannot find resource

Resource Workshop could not find the selected resource. Exit Resource Workshop immediately, without saving files.


Unexpected file format

This error can occur when Resource Workshop:

-	decompiles a binary resource. In this case, the error means that Resource Workshop could not match the binary data with the resource type definition. Resource Workshop skips the resource.

-	saves a program or dynamic link library. The error means that the file is non-standard. This error most often occurs when you try to save Microsoft applications, such as Word for Windows, that use a non-standard executable file format.


Unreleased version format

The version of the file you are opening is greater than Resource Workshop supports.


Software error!

Resource Workshop encountered unexpected data. Exit Resource Workshop immediately, without saving files.


Not implemented

The selected function is not implemented in this release of Resource Workshop.


You cannot use this identifier. It is a keyword, resource type name or resource name

You are trying to create an identifier whose name conflicts with a keyword, resource type name, or resource name. Choose a unique name.


Cannot determine format from extension

You started Resource Workshop with a file name argument in the command line. Resource Workshop cannot determine the file format from the extension.

Use the File|Open Project command to open the project.


File <filename> does not exist

The specified file does not exist.


Command line parameter error

You started Resource Workshop with a command line containing an illegal argument.


Cannot save to a running program

Windows does not support dynamic update of running programs. You must exit the program before saving, or use File|Save File As to save to a different file.


<filename> exists. Overwrite?

You are saving to an existing file. Choose Yes to replace the contents of that file.


<filename> exists. Replace resources?

You are saving resources into an existing program or dynamic link library. Choose Yes to replace the resources in that file.


<filename> has changed. Save?

The contents of the file or project have changed. Choose Yes to save the changes.


Remove contents of <filename> from this project?

If you answer Yes, all resources and/or identifiers in the named file and in any file referenced by the file will be removed from this project.

Because you cannot undo the action, Resource Workshop displays a Warning dialog box when you answer Yes.

The warning message reads:

You cannot undo this action! Select cancel to stop


You cannot undo this action! Select cancel to stop

There is no undo for the action you are about to perform. This is your last chance to change your mind.


Change reference in <filename> from <reference> to <new reference>?

You used the File|Save File As or Resource|Save Resource As command to save a file or resource.

Resource Workshop wants to know whether to change the reference in the current project to that file or resource to the new name just specified. Choose Yes to change the reference.


<filename> is not a valid file name or path

The specified file name is invalid. Correct the name and retry the operation that caused the error.


<filename> does not exist

The specified program or dynamic link library file does not exist. Resource Workshop will not create program files, but will only add resources to those files.


Cannot add <filename> to project twice

The same file cannot be added to the same project two times.

If the file contains a binary resource, select the resource in the Project window. Then use Edit|Duplicate to duplicate the resource. Use Resource|Save Resource As to save the resource to a new file.


Cannot add a new RES or program file to an RC project

When you're using the Add File to Project dialog box, you can't create a new file. You need to specify a file that already exists.


Cannot duplicate a stringtable

Stringtable resources cannot be duplicated, because duplication would result in duplicate IDs.


Could not allocate undo for duplicate

There is not enough memory available to undo a duplicate resource action. Close some applications to free memory.


Identifier already exists

The specified identifier already exists. Use a unique name.

Note that #defines are case-sensitive, but Pascal constants are not.


Could not create identifier

The specified identifier could not be created.


A resource of that name already exists

The selected name is already assigned to another resource. Choose another name.


Too many items to view
Too many items to view.

There is not enough memory available to view the requested items. Close some applications to free memory.


Bad character in source input

The specified source file contains an unrecognizable character.


#define text too long

The definition for the specified #define is too long for Resource Workshop to store. A #define definition must be less than 2000 characters.


Invalid preprocessor directive

Resource Workshop has encountered a # (pound sign) character that is not followed by a valid preprocessor directive name.


Symbol already defined

Resource Workshop encountered a #define whose name is a keyword, or whose definition is not the same as a previous definition.

Although duplicate definitions of the same #define are ignored, two different definitions for the same #define are not allowed.


Expecting #define identifier

Resource Workshop encountered a #define followed by an illegal name. #define names must begin with a letter and contain only letters, digits, and underscores.


'#else' before '#if'

Resource Workshop encountered an #else or an #elif directive without a corresponding #if directive. Use a text editor to correct this syntax error.


'#endif' before '#if'

Resource Workshop encountered an #endif directive without a corresponding #if directive. Use a text editor to correct this syntax error.


Unexpected end of file

An end of file was encountered when processing a compiler directive (#if, #ifdef, etc.).


Expecting resource name or resource type name

Resource Workshop encountered an undefined identifier or integer expression, which it classified as a resource name or ID. It expects the next token to be a resource type name or ID, but encountered something else.


Expecting ')'

A numeric expression contains unbalanced parentheses.


Expecting identifier

Resource Workshop encountered an illegal token in an #ifdef or #if preprocessor directive.


Expecting constant expression

Resource Workshop could not evaluate an integer expression.


Expecting filename

A quoted or unquoted filename is expected.


Expecting filename in quotes

An #include statement was not followed by a filename surrounded by quotes or angle brackets.


Expecting a number or '('

Resource Workshop encountered an unexpected token when attempting to parse an integer expression. This error is frequently caused by a typo in an identifier name.


Expecting BEGIN

Resource Workshop encountered an unexpected token when searching for the BEGIN keyword. This error is frequently caused by a typo in an identifier name.


Expecting END

Resource Workshop encountered an unexpected token when searching for the END keyword.This error is frequently caused by a typo in an identifier name.


Not a positive short integer

Resource and resource type IDs must be positive short integers.


HEXSTRING over 255 bytes long

A hexstring data item was over 255 bytes long. This syntax extension in Resource Workshop is not supported by the Microsoft Resource Compiler.


Invalid value in HEXSTRING

A hexstring data type (a Resource Workshop syntax extension not supported by the Microsoft Resource Compiler) is a series of hex digits and white space surrounded by single quotes.

Resource Workshop encountered a character within the single quotes that cannot be interpreted as a hex digit.


Field too large

Resource Workshop encountered a data field larger than 32K.


PASCAL string over 255 bytes

A Pascal format string must be less than 256 bytes in length.


Cannot open file <filename>
Cannot open file:<filename>

Resource Workshop could not open the specified file.


Conflicting memory options

A resource definition with conflicting memory options has been encountered.


String ID is already used

ID values in stringtable resources must be unique within a single project.


Resource of that name/ID, and type already exists

Resource names or IDs must be unique within type.


Incomplete expression

Resource Workshop could not completely evaluate an expression.


A MENU or POPUP must have at least one item

A MENU and POPUP definition  must contain at least one menu item or menu separator.


An ACCELERATORS table must have at least one item

You cannot define an empty accelerator table.


Fonts require numeric resource IDs
Fonts must have numeric resource IDs

Font resources cannot have alphanumeric literal names. The FONTDIR resource requires a positive short (16-bit) integer font ID.


Invalid font format

Resource Workshop could not compile a font resource due to an invalid format.

This error typically occurs when you try to examine ROMAN.FON, SCRIPT.FON, or MODERN.FON. These vector fonts are shipped with Windows.


Invalid icon format

Resource Workshop could not compile an icon resource due to an invalid file format.


Invalid cursor format

Resource Workshop could not compile a cursor resource due to an invalid format.


Invalid bitmap format

Resource Workshop could not compile a bitmap resource due to an invalid format.


Expecting file name or BEGIN

Resource Workshop could not compile a file or resource. It encountered a token that was not a file name, curly brace, or a BEGIN keyword.


#undef is not supported

Resource Workshop does not support #undef. If the #undef define is required in this .H file in order to satisfy C requirements, surround the statement with the #ifndef directive.


Macro parameter substitution is not supported

Resource Workshop does not support complex macros with parameters in this release.


Expecting signed short integer

Resource Workshop's incremental compiler expects to see a signed short (16-bit) integer or integer expression in this field. This error is usually caused by an undefined identifier.


Expecting unsigned short integer

Resource Workshop's incremental compiler expects to see an unsigned short (16-bit) integer or integer expression in this field. This error is usually caused by an undefined identifier.


Expecting signed long integer

Resource Workshop's incremental compiler expects to see a signed long (32-bit) integer or integer expression in this field. This error is usually caused by an undefined identifier.


Expecting unsigned long integer

Resource Workshop's incremental compiler expects to see an unsigned long (32-bit) integer or integer expression in this field. This error is usually caused by an undefined identifier.


Expecting quoted string

Resource Workshop's incremental compiler expects to see a quoted string in this field.


Expecting resource ID or name

Resource Workshop expects a positive short integer or an unquoted alphanumeric literal for a resource name or ID.


Expecting resource type ID or name

Resource Workshop expects a positive short integer or an unquoted alphanumeric literal for a resource type name or ID.


Expecting window rectangle (4 signed integers)

A dialog control requires 4 unsigned integers to specify its location and size.


Expecting class name or ID

A dialog control requires a quoted name or unsigned character with a value > 0x7F. The unsigned character syntax is reserved for use by standard windows controls.


Expecting HEXSTRING (hex digits surrounded by single quotes)

The CTLDATA keyword for dialog controls must be followed by a HEXSTRING data field.


Invalid menu option

The valid options for POPUP or MENUITEM statements are: CHECKED, MENUBREAK, MENUBAABREAK, INACTIVE, GRAYED, and HELP.


Invalid accelerator option

The valid accelerator options are: ASCII, VIRTKEY, SHIFT, ALT, CONTROL, and NOINVERT.


Invalid acclerator key value
Invalid accelerator key value

Accelerator key values must contain:

-	unsigned characters

-	a quoted string that includes an unsigned character and a ^ to indicate control keys


Invalid font specification

This dialog definition contains the FONT keyword that is not followed by a point size/face name pair.


Expecting caption: quoted string or unsigned integer

A dialog control caption must be either a quoted string or an unsigned short (16-bit) integer.


Pascal string too long

A string that is stored in Pascal format (like those in string tables) can be no longer than 255 bytes.


Expecting control window style

The control specification on this line is not an unsigned long (32-bit) integer or expression. This error is usually caused by an undefined style identifier.


Expecting menu text (quoted string) or SEPARATOR

The MENUITEM keyword must be followed either by a quoted string (the item text) or the keyword SEPARATOR.


Compile initialization failed

The compiler could not complete initialization. Exit and restart Resource Workshop.


Input reset failed

The compiler could not complete initialization. Exit and restart Resource Workshop.


Source input stack overflow (too many nested includes?)

The sum of your nested includes or #defines exceeds 63.


Parser stack overflow

The nesting level of a recursive resource definition exceeds a Resource Workshop limitation. For example, this error can occur if the number of nested pop-ups exceeds 63.


Expression stack overflow

An integer expression is too complex for Resource Workshop to evaluate. The maximum nesting depth is 32. Try simplifying the expression by removing parentheses.


File IO error

A read error occurred on a file. Check to see if the file is corrupt.


New symbol failed

Resource Workshop could not create a #define or constant. This error is usually caused by a lack of memory.


New field instance failed

In the process of creating a field record, Resource Workshop could not obtain memory for an operation. Exit Resource Workshop immediately, without saving files.

To free up more memory for use by Resource Workshop, exit other applications, or run Windows in Enhanced mode.


Allocate failed

Resource Workshop could not obtain memory for an operation. Exit Resource Workshop immediately, without saving files.

To free up more memory for use by Resource Workshop, exit other applications, or run Windows in Enhanced mode.


Memory lock failure
Memory lock failed

Resource Workshop could not lock memory. Exit Resource Workshop immediately, without saving files.


VTMgr allocation error

Resource Workshop could not obtain memory for an operation. Exit Resource Workshop immediately, without saving files.

To free up more memory for use by Resource Workshop, exit other applications, or run Windows in Enhanced mode.


VTMgr lock error

Resource Workshop could not lock memory. Exit Resource Workshop immediately, without saving files.


VBuff allocation error

Resource Workshop could not obtain memory for an operation. Exit Resource Workshop immediately, without saving files.

To free up more memory for use by Resource Workshop, exit other applications, or run Windows in Enhanced mode.


VBuff lock error

Resource Workshop could not lock memory. Exit Resource Workshop immediately, without saving files.


Internal software error

Resource Workshop encountered unexpected data. Exit Resource Workshop immediately, without saving files.


Device dependent bitmap does not match current display. Cannot convert

You tried to open a Windows 2.0 resource file containing a device-dependent bitmap in a format that does not match the current display device. Use another tool to convert the bitmap.


Preprocessor directives not allowed

Preprocessor directives are not allowed when editing a resource as text.


Too much data for 1 field

You entered more data in this field than the incremental compiler allows. This error may also be caused by an invalid character that was parsed as an extra token. Delete the extra data.


A compile is in progress in another instance

You tried to start a compile while a compile is still in progress in another copy of Resource Workshop. Wait until the compile has completed in the other copy before retrying this

operation.


Cannot convert Windows 2 image: file is read-only

You opened a resource file containing a Windows 2.0 format bitmap resource. However, the file is read-only. Change the file's attributes to examine the file in Resource Workshop.


Too many controls

A dialog resource contains more than 255 controls. Only 255 controls are allowed per dialog template.


Invalid escape sequence

A backslash character in a string was not followed by a valid escape code.


Too many digits in a number

The number contains too many digits to be represented by an unsigned 32-bit integer.


Expecting unit keyword

Resource Workshop encountered an unrecognized token when it was expecting a unit keyword. Make sure that the include or unit file is syntactically correct by compiling it.


Expecting semicolon

Resource Workshop encountered an unrecognized token when it was expecting a semicolon. Make sure that the include or unit file is syntactically correct by compiling it.


Expecting interface keyword

Resource Workshop encountered an unrecognized token when it was expecting an interface keyword. Make sure that the include or unit file is syntactically correct by compiling it.


Must be first token on a line

A preprocessor directive or constant name must be the first token on a source line. Use an external text editor to correct the source.


Pascal syntax error (unrecognized token)

Resource Workshop encountered an unrecognized token. Make sure that the include or unit file is syntactically correct by compiling it.


Unexpected const keyword

Resource Workshop encountered an unexpected const keyword. Make sure that the include or unit file is syntactically correct by compiling it.


Unexpected operator

Resource Workshop encountered an unexpected operator. Make sure that the include or unit file is syntactically correct by compiling it.


Please enter a valid filename

You specified a text editor in the Compile Error dialog box, that does not exist. Enter the complete filename, including the file extension.


Identifier already in use
Identifier already exists

The name you selected for this identifier is already in use. Use a unique name.

Note that #defines are case-sensitive, but Pascal constants are not.


Please enter a name

You tried to create a new resource without specifying a name. Enter a name and choose OK.


Resource already exists

A resource of the type and name specified already exists in this project. Resource names and IDs must be unique by type and in a project. Use a name or ID that is not used for a resource of this type.


Could not create resource

Resource Workshop could not create the new resource. If the resource name is valid, try the operation again.

If the error persists, check to see how much memory is available. If memory is low, close another application or run Windows in enhanced mode.


Please close window
Please close a window

Resource Workshop allows only 10 editor windows to be open at the same time. To open this window, you need to close another.


Resource editor initialization error

An unspecified error occurred while trying to create a resource editor window. This type of error should not occur during normal operation of the program.


Cannot rename a stringtable

String table resources are not named; rather each string within a stringtable is given a resource ID. Therefore, you cannot rename a stringtable resource.

The name Resource Workshop displays for a stringtable resource is merely the ID or identifier of the first string in the table.


Fonts must have numeric resource IDs

Font resources cannot have alphanumeric literal names. The FONTDIR resource requires a positive short (16-bit) integer font ID.


Could not allocate undo for rename

There was not enough memory available to create an undo record for the specified operation. Save the current project, and exit Resource Workshop. To free memory, exit other applications or run Windows in enhanced mode.


Could not allocate undo for delete

There was not enough memory available to create an undo record for the specified operation. Save the current project, and exit Resource Workshop. To free memory, exit other applications or run Windows in enhanced mode.


Could not allocate undo for new

There was not enough memory available to create an undo record for the specified operation. Save the current project, and exit Resource Workshop. To free memory, exit other applications or run Windows in enhanced mode.


Could not allocate undo for memory options

There was not enough memory available to create an undo record for the specified operation. Save the current project, and exit Resource Workshop. To free memory, exit other applications or run Windows in enhanced mode.


Not a valid identifier

The name you selected for a #define or constant is not syntactically correct. Identifier names must start with a letter and contain only letters, digits, and underscores.


Resource type already exists

You are trying to create a new resource type that already exists. Use a unique name or ID for the resource type.

Note that user-defined resource type IDs should be greater than 256, since the numbers 1 to 256 are reserved for use by the operating system vendor.


Identifier is used as a literal

The name you have chosen for this identifier is used as a literal in this project (either a resource name, resource type name, or keyword). Choose a unique name for the identifier.


Resource is too large to edit as text

Resource Workshop uses a standard Windows edit window for its text editor. The maximum capacity of this window is approximately 32K. In order to edit this resource as text, you must save it into a separate .RC file, and use a larger capacity text editor.


#define/constant is used. Delete anyway?

This #define or constant is used in one or more resources. If you delete it, Resource Workshop will substitute its value for its name in every place it is used.


Create a new identifier: <identifier name>?

You entered an alphanumeric value in a numeric field. In order to use that alphanumeric value in this field, you must assign a number to it by creating an identifier. Click Yes to create a new identifier.


Font is too large to save in Version 2 format! (>64K)
Font is too large to save in Version 2 format! (>64K)     (Fonts)

You cannot save this font in Windows Version 2.0 format. It is too large.


Width must be from 1 to 32767

You entered an incorrect value. Enter a value from 1 to 32767.


Height must be from 1 to 32767

You entered an incorrect value. Enter a value from 1 to 32767.


Maximum width is 32767

You entered an incorrect value. Enter a value from 1 to 32767.


Maximum height is 32767

You entered an incorrect value. Enter a value from 1 to 32767.


Font weight must be from 1 to 1000
Font weight must be from 1 to 1000     (Fonts)

The value in the Weight input box is incorrect. Enter a value from 1 to 1000.


Font family must be from 0 to 15
Font family must be from 0 to 15     (Fonts)

The value in the Family input box is incorrect. Enter a value from 0 to 15.


Character set must be from 0 to 255
Character set must be from 0 to 255     (Fonts)

The value in the Character Set input box is incorrect. Enter a value from 0 to 255.


Horizontal resolution must be from 1 to 65535
Horizontal resolution must be from 1 to 65535     (Fonts)

The value you entered in the Horizontal Resolution input box is incorrect. Enter a value from 1 to 65535.


Vertical resolution must be from 1 to 65535
Vertical resolution must be from 1 to 65535     (Fonts)

The value in the Vertical Resolution input box is incorrect. Enter a value from 1 to 65535.


Points must be from 1 to 65535
Points must be from 1 to 65535     (Fonts)

The value in the Points input box is invalid. Enter a value from 1 to 65535.


Internal leading must be less than character height
Internal leading must be less than character height     (Fonts)

The value in the Internal Leading input box is incorrect. It must be less than the value in the Character Height input box.


External leading must be from 0 to 65535
External leading must be from 0 to 65535     (Fonts)

The value in the External Leading input box is incorrect. Enter a value from 0 to 65535.


Ascent must be less than character height
Ascent must be less than character height     (Fonts)

The value in the Ascent input box is invalid. It must be less than value in the Character Height input box.


Division by zero is not allowed

You specified a constant expression or a remainder function that contains a divide by zero. This is not allowed-you must change the expression or function.


Delete Resource: <resource name>

The selected resource will be deleted. Click Yes if you're sure you want to delete it. Click No if you don't want to delete it.


#error directive encountered: <error mesage>
#error directive encountered: <error message>

The Resource Workshop compiler encountered an #error directive. The text of the user-defined message is displayed.


Please enter valid number
Please enter a valid number     (Paint editor)

You must enter a value between 0 and 255 in the RGB input boxes of the Edit Color dialog box or the Set Transparent Color dialog box. Enter the value again.


File extension: <.EXT> does not match the standard for this type: <.EXT> Continue anyway?

You are saving a file to an extension that's not supported for that resource type. For example, you're trying to save a cursor resource to a .BMP file type.

Click Yes to save the file to the unsupported file type. Click No to cancel the file save.


WARNING! This DLL may or may not be a valid custom control library.
WARNING! This DLL may or may not be a valid custom control library. If it is not, a system crash is likely! Do you wish to proceed?

You are trying to install a .DLL file that might not be valid custom control library. If the file is invalid, your system could crash.


<filename> does not exist. Create?

The specified file does not exist. Click Yes if you want to create it.


Incorrect resource compiler version

You tried to open an .EXE file whose resource version mark is not supported by Resource Workshop.


Invalid file format

You tried to open a file that is in an unrecognizable format.


Memory allocation error during decompile

There was not enough available memory to open the specified .RES or .EXE file. Close some applications or windows and try again.


No resources in this file

You tried to open an .EXE file that contains no resources.


Not a valid identifier name

The name you selected for a #define or constant is not syntactically correct. Identifier names must start with a letter and contain only letters, digits, and underscores.


Not a valid resource name

The name you selected for a resource is not syntactically correct. Resource names must start with a letter and contain only letters, digits, and underscores.


Number of undo levels must be > 1 and < 100

The number of undo levels must be between 1 and 100. Enter a valid value.


Resource binary too large

The binary resource you're trying to read into Resource Workshop is too large.


Resource has changed. Compile?
Resource has changed. Compile? WARNING: Changes will be discarded if you answer no!

The resource you're working on has changed. If you don't compile the changes, they will be discarded.


Syntax error

An unspecified syntax errors has occurred. Check the syntax and recompile.


Token is too large for scanner (unbalanced quotes?)

The scanner tried to create a token for a string or hexstring, but couldn't find the closing single or double quote.


Value is out of range

The value you entered is not valid. Enter a valid value.


System resources low. Please close some files or applications.

Resource Workshop has detected a low memory condition in USER.EXE's heap, used to store windows and menus. Close some windows and/or applications.


<filename> exists. Overwrite?

<filename> exists. Replace resources?

The first message is displayed if you are saving to an existing file. Choose Yes to replace the contents of that file.

The second message is displayed if you are saving resources into an existing program or dynamic link library. Choose Yes to replace the resources in that file.


You have opened a Windows version 2 file.

The file you're trying to open contains resources that are in Windows version 2 format. Resource Workshop will convert all Windows version 2 resources to version 3 format.

Click OK to continue the process. Click Cancel to cancel the conversion.


Functional listing of menu commands
Functional listing of Resource Workshop menus

Here' s a functional listing of all the menus in Resource Workshop. For an alphabetical listing, see the Alphabetical listing of Resource Workshop menus Help screen.

Primary menus

Compile

Control

Edit

File

Help

Resource

View

Window

Accelerator editor menu

Accelerator

Menu editor menus

Menu

View

Stringtable editor menu

Stringtable

Dialog editor menus

Align

Control

Options

Paint editor menus

Options

View

Text

Icon menus

Icon

Images

Cursor menu

Cursor

Bitmap menu

Bitmap

Font menu

Font


Alphabetical listing of menu commands
Alphabetical listing of Resource Workshop menus

Here' s an alphabetical listing of the menus in Resource Workshop. For a functional listing, see the Functional listing of Resource Workshop menus Help screen.

Accelerator

Align

Bitmap

Compile

Control

Cursor

Edit

File

Font

Help

Icon

Images

Menu

Options

Resource

Stringtable

Text

View

Window


Control menus

There are two Control menus in Resource Workshop. There's the:

−	Control menu that affects the Resource Workshop desktop

-	Control menu that's displayed when you create a dialog box


Options menus

There are two Options menus in Resource Workshop. There's an:

-	Options menu that's displayed when you edit a dialog box

-	Options menu that's displayed when you  edit a bitmapped resource


View menus

There are three View menus in Resource Workshop. There's a:

-	View menu that's displayed when you open a project or resource

-	View menu that's displayed when you edit a bitmapped resource

-	View menu that's displayed when you edit a menu


File menu overview
File menu

The File menu, along with the Help menu, is displayed when you first open Resource Workshop. You use this menu to create, open, close, and save projects; add resource files to and remove resource files from projects; close files; set configuration options; and exit Resource Workshop.

Here are the File menu commands:

New Project

Open Project

Preferences

Exit

Once you've created or opened a project, several more File commands are available:

Save Project

Save File As

Close All

Add To Project

Remove From Project


File|New Project

File|New Project brings up the New Project dialog box, where you create your project file.


New Project dialog box overview
New Project dialog box

The New Project dialog box is where you choose the type of file on which to base your project.

Project File Type radio buttons

The Project File Type radio buttons select the project file type.


Project File Type radio buttons

Here are the types of files on which you can base your project:

.RC

Turn on the .RC radio button to base your project on a resource compiler (.RC) file. You'll usually choose this option because this type of file lets you add in any resource you want.

.RES

Turn on the .RES radio button to base your project on a binary resource (.RES) file. This type of file contains one or more compiled resources.

.CUR

Turn on the .CUR radio button to base your project on a cursor (.CUR) file. A cursor file contains a cursor image.

.ICO

Turn on the .ICO radio button to base your project on an icon (.ICO) file. An icon file contains one or more images of an icon.

.BMP

Turn on the .BMP radio button to base your project on a bitmap (.BMP) file. A bitmap file contains a bitmap image.

.FNT

Turn on the .FNT radio button to base your project on a font (.FNT) file. A font file contains one or more customized font images.


File|Open Project

File|Open Project opens an existing project. An existing project is one that you created with Resource Workshop or an .RC file you created with other resource development software.

The File|Open Project command brings up the Open Project dialog box.


Open Project dialog box overview
Open Project dialog box

The Open Project dialog box is where you open an existing project.

File Name input box

The File Name input box is where you enter the name of the file to open.

File Type list

The File Type list selects the type of file to open.

Path display box

The Path display box displays the current path.

Files list box

The Files list box displays the files in the current directory.

Directories list box

The Directories list box displays the directories on your computer.


File Name input box

Enter the file name in the File Name input box. This input box has a different meaning based on the dialog box you're working with:

-	If you're using the Add To Project dialog box, enter the name of the file you're adding to the current project.

-	If you're using the Open Project dialog box, enter the name of the file you want to open.

-	If you're using the Save File As dialog box, enter the name of the file you want to save.

-	If you're using the Save Resource As dialog box, enter the new file name for the resource you're working with.

If you enter a file extension that represents a standard file type, Resource Workshop assigns the proper type to the file. However, if you use a nonstandard extension, be sure to pick the correct file type from the File Type list before exiting the dialog box.


File Type drop down box
File Type list

Select the type of file from the File Type list. If you enter a file extension representing a standard file type in the File Name input box, Resource Workshop assigns the proper file type to the file.

However, if you use a nonstandard extension, click the arrow in the File Type list box and scroll down to the correct file type. Double-click the correct file type.


Path display box

The Path display box shows the current path.

-	If you're using the Add To Project dialog box, the Path display box shows where the file will be read from if you enter only the file name.

-	If you're using the Open Project dialog box, the Path display box shows where the file will be read from if you enter only the file name.

-	If you're using the Save File As dialog box, the Path display box shows where the file will be stored if you enter only the file name.

-	If you're using the Save Resource As dialog box, the Path display box shows where the file will be stored if you enter only the file name.


Files list box

To use the Files list box, enter a file name with a wildcard in the File Name input box and press Enter. You'll see a list of all matching files appear in the File list box. You can scroll down and select a file.


Directories list box

If you select a directory name in the Directories list box, you'll see the directory name appear in the File Name input box. When you press Enter, the directory name is displayed in the Path display box.


File|Save Project

The File|Save Project command saves everything in your current project. If you're saving a new project that hasn't been named yet, Resource Workshop displays the Save File As dialog box, where you specify the file name and directory.


File|Save File As

Use the File|Save File As command if you want to rename the current project or resource file. Resource Workshop brings up the Save File As dialog box, where you specify the file's new name and directory.


Save File As/Save Resource As dialog box

The Save File As dialog box is where you rename a file when you save it.

The Save Resource As dialog box is where you put a resource in a separate file for use with other projects.


Save File As dialog box overview
Save File As dialog box

The Save File As dialog box is where you rename a project file or resource file when you save it.

File Name input box

The File Name input box is where you enter the new file name.

File Type list

The File Type list selects the type of file to open.

File Selected display box

The File Selected display box shows information about the file.

Path display box

The Path display box displays the current path.

Files list box

The Files list box displays the files in the current directory.

Directories list box

The Directories list box displays the directories on your computer.


File Selected display box

The File Selected display box shows the file's current path and name.


File|Close All

The File|Close All command closes all open files. If you've made changes and haven't saved them, Resource Workshop asks you if you want to save the changes. Click Yes.

When it closes files, Resource Workshop compiles the resources that have changed since the last compile and saves them into the project file. Any changed resource linked to an external file will be updated in the external file.


File|Add To Project

The File|Add To Project command adds a resource stored in an external file to the current project.

This command brings up the Add File To Project dialog box where you specify the file name.


Add File To Project dialog box overview
Add File To Project dialog box

The Add File To Project dialog box is where you specify the name of an external file to add to your project.

File Name input box

The File Name input box is where you enter the name of the external file.

File Type list

The File Type list selects the type of file to open.

RCINCLUDE will be Placed In drop-down box

The RCINCLUDE drop-down box selects the file where the RCINCLUDE resource script statement will be placed.

Path display box

The Path display box displays the current path.

Files list box

The Files list box displays the files in the current directory.

Directories list box

The Directories list box displays the directories on your computer.


RCINCLUDE will be Placed In drop-down box
RCINCLUDE will be Placed In drop down box

The RCINCLUDE drop down box selects the file where the RCINCLUDE resource script statement will be placed. This is usually your current project file.

If your project contains more than one .RC file, and you want to put the reference elsewhere, scroll down the list to find the name of the file in which you want to place the reference.


File|Remove From Project

The File|Remove From Project command removes the selected file from the current project. This command is enabled only when the View|By File command is active.


File|Preferences

The File|Preferences command brings up the Preferences dialog box, where you set configuration options.


Preferences dialog box overview
Preferences dialog box

The Preferences dialog box is where you set Resource Workshop configuration options.

Undo Levels input box

The Undo Levels input box is where you enter the number of changes you want to trace when you undo or redo actions.

Text Editor input box

The Text Editor input box is where you specify the name of the text editor that Resource Workshop uses.

Include Path input box

The Include Path input box lets you enter the path where Resource Workshop searches for include files.

Multi-Save check boxes

The Multi-Save check boxes determine how a project is saved.

Backups check box

The Backups check box creates backup files each time you save a project.

Windows target version check boxes

The Windows target version check boxes choose the Windows version you're working with.


Undo Levels input box

The Undo Levels input box is where you enter the number of changes you want to trace when you undo or redo actions with the Edit|Undo or Edit|Redo commands.

Depending on the amount of memory in your computer, you can undo or redo up to 99 actions. The default number is 10.


Text Editor input box

The Text Editor input box is where you specify the name of the text editor that Resource Workshop uses. The default text editor is the Windows Notepad editor, NOTEPAD.EXE.

You use the text editor to edit a resource's source script.


Include Path input box

Enter the path Resource Workshop uses to search for identifier files in the Include Path input box.

Set this option when all projects are closed. When you choose this option, Resource Workshop saves it in WIN.INI as the default include path.


Multi-Save check boxes

The Multi-Save check boxes control how a project is to be saved when you select File|Save Project. These preferences are enabled only when a project is open because they apply to a specific project. Regardless of the multi-save settings, the project always gets saved in its original format.

.RES check box

The .RES check box saves the project's resources in .RES format.

Executable check box

The Executable check box saves the project's resources and binds them to the specified file.


RES check box

Turn on the .RES check box to save the project's resources in a .RES file in binary format.


Executable check box

Turn on the Executable check box to save the project's resources and bind them to the specified executable file. The executable file can be an .EXE file or a .DLL file.


Make Backups When Saving Files check box

Turn on the Make Backups When Saving Files check box to create an additional set of backup files each time you save a project. Backup files have a tilde as the first character in the file extension.


Windows target version check boxes

The Windows target version check boxes choose the Windows version you're working with.

Windows 3.0 check box

Turn this check box on if you're creating resources for a Windows 3.0 application.

Windows 3.1 check box

Turn this check box on if you're creating resources for a Windows 3.1 application.


File|Exit

The File|Exit command exits you from Resource Workshop and closes all files. If you've made changes and haven't saved them, Resource Workshop asks you if you want to save the changes. Click Yes.


Edit menu overview
Edit menu

The Edit menu provides commands to undo, redo, cut, copy, paste, delete, and select areas of your image.

You can choose from these Edit menu commands:

Undo

Redo

Cut

Copy

Paste

Delete

Duplicate

Select All


Edit|Undo
Edit|Undo (Alt+Backspace)

The Undo command "undoes" your most recent action.

It inserts any characters you deleted, deletes any characters you inserted, replaces any characters you overwrote, and moves your cursor back to its prior position.

If you undo a block operation on a resource, the resource will appear as it was before you executed the block operation.

If you continue to press Undo, it continues to undo changes until it reaches the number specified in the Undo Levels input box in the Preferences dialog box.

The Undo command will not change an option setting that affects more than one window.


Edit|Redo
Edit|Redo (Shift+Alt+Backspace)

Redo reverses the effect of the most recent Undo command.

It is effective only immediately after an Undo or another Redo.

A series of Redo commands reverses the effects of a series of Undo commands.


Edit|Cut
Edit|Cut (Shift+Del)

The Cut command puts the selected area of your image in the Windows clipboard. You can then choose Edit|Paste to paste the image somewhere else in the same project or in another project running in another copy of Resource Workshop.


Edit|Copy
Edit|Copy (Ctrl+Ins)

The Copy command copies the selected area of your image. To paste the copied image somewhere else in the same project or in another project running in another copy of Resource Workshop, choose Edit Paste.


Edit|Paste
Edit|Paste (Shift+Ins)

The Paste command inserts the selected area at the cursor position. This command is active only if you've selected the area with the Edit|Cut or Edit|Copy commands.

If you're in the Project window, this command brings up the Paste Resource dialog box, where you paste resources.


Paste Resource dialog box overview
Paste Resource dialog box

The Paste Resource dialog box is where you paste resources and associated identifiers into a new file.

Paste Resource Into drop-down box

The Paste Resource Into drop-down box is where you choose the file into which you're going to paste the resource.

Paste Identifiers Into drop-down box

The Paste Identifiers Into drop-down box is where you choose the file into which you're going to paste the associated identifiers.


Paste Resource Into drop-down box

The Paste Resource Into drop-down box is where you the choose file into which you're going to paste the selected resource.


Paste Identifiers Into drop-down box

The Paste Identifiers Into drop-down box is where you choose the file into which you're going to paste the associated identifiers.


Edit|Delete
Edit|Delete (Del)

The Delete command removes the selected area. You can't paste the area as you could if you had chosen Cut or Copy.

If you're in the String editor, this command is the same as the Stringtable|Delete Item command.


Edit|Duplicate

The Duplicate command duplicates an area of the image by copying the area you've selected and placing the copy in the upper left corner of the image. As long as the area is still selected, you can use the mouse or arrow keys to move the copied area anywhere in the image.

If you're in the Project window, this command brings up the Duplicate Resource dialog box. If you're in the Dialog editor, this command brings up the Duplicate Control dialog box.


Duplicate Resource dialog box overview
Duplicate Resource dialog box

The Duplicate Resource dialog box is where you duplicate a resource.

Duplicate Resource Will Be Placed In drop-down box

The Duplicate Resource Will Be Placed In drop-down box is where you choose the file into which you're going to place the duplicate resource.


Duplicate Resource Will Be Placed In drop-down box

The Duplicate Resource Will Be Placed In drop-down box is where you choose the file into which you're going to place the duplicate resource.


Duplicate Control dialog box overview
Duplicate Control dialog box

The Duplicate Control dialog box is where you place multiple copies of a control in rows and columns.

Rows input box

The Rows input box is where you specify the number of rows you want.

Columns input box

The Columns input box is where you specify the number of columns you want.

Row Spacing input box

The Row Spacing input box is where you specify the spacing between rows.

Column Spacing input box

The Column Spacing input box is where you specify the spacing between columns.


Rows input box

In the Rows input box, enter the number of rows for your multiple controls.


Columns input box

In the Columns input box, enter the number of columns for your multiple controls.


Row Spacing input box

In the Row Spacing input box, enter the spacing you want between rows.


Column Spacing input box

In the Column Spacing input box, enter the spacing you want between columns.


Edit|Select All

The Select All command is active when you're editing:

-	a resource's source script

-	a resource image

This command selects the entire source script or image. You can then cut the script or image, copy it, paste it, delete it or duplicate it.


Resource menu overview
Resource menu

Use the Resource menu to create, edit, save, and rename resources; define a resource's memory options; and add, edit, and delete identifiers.

Here are the Resource memory commands:

New

Edit

Edit As Text

View

Save Resource As

Rename

Memory Options

Identifiers


Resource|New

The Resource|New command brings up the New Resource dialog box where you create a new resource.


New Resource dialog box overview
New Resource dialog box

The New Resource dialog box is where you specify the type of resource to create.

Resource Type list box

The Resource Type list selects the type of resource to create.

Place Resource In combo box

The Place Resource In combo box selects where to put the new resource.

New Type button

The New Type button creates a new resource type.


Resource Type list (New Resource dialog box)
Resource Type list box

Select the type of resource you want to create from the Resource Type list box.

If you want to create your own resource type, press the New Type button. If you've already created a resource type, it will be listed in the Resource Type list.


Place Resource In drop down box
Place Resource In combo box

The Place Resource In combo box specifies the name of the project in which you'll place the new resource.

If your project contains more than one .RC file, and you want to put the resource elsewhere, scroll down the list to find the name of the file in which you want to place the resource.


New Type button

The New Type button brings up the New Resource Type dialog box where you create your own resource type.


New Resource Type/Custom Resource dialog box

The New Resource Type dialog box is where you create your own resource type.

The Custom Resource dialog box is where you choose a user-defined resource type.


New Resource Type dialog box overview
New Resource Type dialog box

The New Resource Type dialog box is where you create your own resource type.

Resource Type input box

The Resource Type input box is where you enter the name of the new resource type.

Resource Type list

The Resource Type list shows the resources that are already defined.


Resource Type input box

Enter the name of the new resource type in the Resource Type input box.


Resource Type list (New Resource Type dialog box)
Resource Type list

The resources that are already defined are displayed in the Resource Type list.


Custom Resource dialog box overview
Custom Resource dialog box

You'll see the Custom Resource dialog box when you use the Add File To Project dialog box to read in an existing file that's not a standard resource type.

You can click OK, Cancel, or press the New Type button to display the New Resource Type dialog box.


Resource|Edit

The Resource|Edit command brings up the selected resource in the appropriate editor, ready for editing.


Resource|Edit As Text

The Resource|Edit As Text command brings up the selected resource in the text editor. You can then edit the resource's source script.


Resource|View

Resource|View shows you what the selected resource looks like.


Resource|Save Resource As

The Resource|Save Resource As command puts a resource in a separate file for use with other projects.

Resource Workshop brings up the Save Resource As dialog box where you specify the file's new name and directory.


Save Resource As dialog box overview
Save Resource As dialog box

The Save Resource As dialog box is where you rename a resource when you save it.

File Name input box

The File Name input box is where you enter the resource's new file name.

File Type list

The File Type list selects the type of file in which to save the resource.

Resource display box

The Resource display box shows information about the resource.

Path display box

The Path display box displays the current path.

Files list box

The Files list box displays the files in the current directory.

Directories list box

The Directories list box displays the directories on your computer.


Resource display box (Save Resource As dialog box)
Resource display box

The Resource display box shows the name currently assigned to the resource.


Resource|Rename

The Resource|Rename command brings up the Rename Resource dialog box, where you rename your resource.


Rename Resource dialog box overview
Rename Resource dialog box

The Rename Resource dialog box is where you rename a resource.

Old Name display box

The Old Name display box shows the resource's name.

New Name input box

The New Name input box is where you enter the resource's new name.


Old Name display box

The resource's current name is displayed in the Old Name display box. You can't change the name in this box.


New Name input box

Enter the resource's new name in the New Name input box.


Resource|Memory Options

The Resource|Memory Options command brings up the Resource Memory Options dialog box, where you specify memory options for your resources.


Resource Memory Options dialog box overview
Resource Memory Options dialog box

The Resource Memory Options dialog box is where you specify how each resource in your project should be managed in memory.

Resource Name display box

The Resource Name display box displays the name of the resource.

Memory Options check boxes

The Memory Options check boxes specify a resource's load and memory options.


Resource Name display box

The Resource Name display box shows the name of the selected resource.


Memory Options check boxes

The Memory Options check boxes specify how a resource is loaded and managed in memory. The resource name you're working with is displayed at the top of the dialog box.

Load On Call check box

The Load On Call check box loads the resource into memory when it's needed.

Moveable check box

The Moveable check box lets Windows move the resource segment in memory.

Discardable check box

The Discardable check box lets Windows discard the resource segment from memory.

Pure check box

The Pure check box prevents the resource segment from being modified.


Load On Call check box

Turn on the Load On Call check box to load the resource into memory only when it's needed. Choosing this option can reduce the amount of time required to load your program.

If you turn this option off, you'll activate Preload, which means that Windows will load the resource into memory when it first loads the program. Preload a resource only if you know Windows needs it as soon as the application begins to execute.


Moveable check box

Turn on the Moveable check box to let Windows move the resource segment in memory to make room for other memory allocations.

If you turn this option off, the resource occupies a fixed location in memory.


Discardable check box

Turn on the Discardable check box to let Windows discard the resource segment from memory when it's no longer needed. Windows can load the resource into memory again when necessary.

If you turn this option off, you'll activate Nondiscardable, which means that Windows won't be able to remove the resource from memory while the application is running. If the Pure check box is also off, you'll be able to modify the resource from within your application.


Pure check box

Turn the Pure check box on to prevent the resource segment in memory from being modified. Usually, you'll leave this option on.


Resource|Identifiers

The Resource|Identifiers command brings up the Identifiers dialog box, where you can add, edit, and delete identifiers.


Identifiers dialog box overview
Identifiers dialog box

The Identifiers dialog box is where you add, edit, delete, or list identifiers.

Name display box

The Name display box shows identifier names.

Value display box

The Value display box shows identifier values.

Identifiers list

The Identifiers list shows identifiers.

Usage list

The Usage list shows where the identifier is used.

View radio buttons

The View radio buttons control which identifiers Resource Workshop displays.

Show Predefined check box

The Show Predefined check box displays the predefined #defines.

New button

The New button adds a new identifier.

Change button

The Change button changes an identifier.

Delete button

The Delete button deletes an identifier.


Name display box (Identifiers dialog box)
Name display box

The Name display box displays the name of the identifier that's highlighted in the Identifiers list. You can't enter this name; you need to pick it from the Identifier list.


Value display box

The Value display box displays the value assigned to the identifier that's displayed in the Name display box.


Identifier list
Identifiers list

The identifiers are displayed in the Identifiers list.


Usage list

The Usage list shows the files in which the selected identifier is used.


View radio buttons

The View radio buttons control which identifiers Resource Workshop displays in the Identifiers list.

All

Turn on the All radio button if you want to display identifiers you've added to your project.

Single File

Turn on the Single File radio button if you want to display identifiers that are in a specified file. Choose the file name from the drop-down box to the right of the radio button.


Show Predefined check box

Turn on the Show Predefined check box if you want to display the predefined #defines that are included with Windows.


New button

The New button displays the New Identifier dialog box where you add a new identifier.


New Identifier dialog box overview
New Identifier dialog box

The New Identifier dialog box is where you add a new identifier. This dialog box pops up whenever you create a new identifier in a resource editor.

Name input box

The Name input box is where you enter the identifier name.

Value input box

The Value input box is where you enter the identifier's value.

File drop-down box

The File drop-down box selects where to put the identifier.


Name input box

The Name input box is where you enter the name of the new identifier.


Value input box

The Value input box is where you enter the resource ID you want to assign to the identifier.


File drop-down box

The File drop-down box is where you choose the file in which to place the identifier. You'll usually pick the identifier file for the current project.


Change button

The Change button brings up the Change Identifier Value dialog box where you change an identifier's value


Change Identifier Value dialog box overview
Change Identifier Value dialog box

The Change Identifier Value dialog box is where you change an identifier's value.

Name display box

The Name display box shows the identifier's name.

Old Value display box

The Old Value display value shows the identifier's current value.

New Value input box

The New Value input box is where you enter the identifier's value.


Name display box (Change Identifier Value dialog box)
Name display box

The identifier's name is displayed in the Name display box. You can't change the name in this box.


Old Value display box

The identifier's current value is displayed in the Old Value display box. You can't change the value in this box.


New Value input box

The New Value input box is where you enter the new value for the identifier.


Delete button

The Delete button deletes the selected identifier.


View menu (Primary menu)
View menu

The View menu is displayed when you open a project or resource. Use this command to determine how the Project window displays information. (This is different from the View menu that's displayed you're editing a menu or the View menu that's displayed when you're using the Paint editor.)

Here are the View menu options:

By File

By Type

Show Identifiers

Show Resources

Show Items

Show Unused Types


View|By File

Use the View|By File command to group resources according to the file they're in. This command displays all resources and file names in the Project window in the order in which they appear in the source files.

Resource Workshop indicates whether resources are saved in the project file or in a external file.


View|By Type

The View|By Type menu command groups resources according to type, such as icon, menu, and dialog. Choose this command to see all resources listed in the Project window according to type instead of file name.

Resources are listed in this order:

-	Bitmaps

-	Menus

-	Dialogs

-	String tables

-	Accelerators

-	RCDATA

-	Cursors

-	Icons

-	User-defined resources

After the list of resources, any identifiers in the project are listed if you've turned on  the View|Show Identifiers command.


View|Show Identifiers

The View|Show Identifiers command displays any identifiers in the project. If you don't want to see the identifiers displayed in the Project window, turn this command off.


View|Show Resources

The View|Show Resources command lists the individual names of resources. Turn this command off to see just file names in the Project window without an explanation of the resource types contained in those files.


View|Show Items

The View|Show Items command shows another level of detail in the Project window. When this command is on, you can see items within individual resources (for example, POPUPs and MENUITEMs defined in a menu resource).


View|Show Unused Types

The View|Show Unused Types command displays all possible types of resources in the Project window, even if some of them are not included in the project.

Turn on View|By Type for this option to be useful.


Window menu overview
Window menu

The Window menu contains commands for manipulating and opening windows.

Most of the windows you open from this menu have all the standard window elements, like scroll bars, Minimize and Maximize buttons, and a Control menu box.

At the bottom of the Window menu is a list of open windows. If there is more than one, you can switch to another window and make it active by selecting it from the list.

These are the Window menu commands:

Tile

Cascade


Window|Tile

Choose Window|Tile to tile your open windows.

This option arranges the windows so they cover the entire desktop without overlapping one another.


Window|Cascade

Choose Window|Cascade to stack all open edit windows.

This option overlaps open windows so each is the same size as all others and only part of each underlying window is visible.


List of open windows

At the bottom of the Window menu is a list of open windows.

If more than one window is open, you can switch to another window and make it active by choosing it (either click it in the list, or type the number associated with the window you want).


Help menu overview
Help menu

The Help menu provides access to online Help, which comes up in a special Help window.

The Help system provides information on virtually all aspects of Resource Workshop.

(Also, don't forget that one-line menu and dialog-box hints appear on the status line whenever you select a menu command or dialog box item.)

These are the Help menu commands:

Index

Using Help

Getting Started

Projects

Resources

Using the Menus

Error Messages

Resource Script

About Resource Workshop


Help|Index
Help|Index (F1)

Resource Workshop's online Help comes with a comprehensive index that summarizes the organization and contents of the Help system.

To get into the Help system from the index, choose one of the highlighted words or phrases in the index: click it, or Tab to it and then press Enter.

If you don't know how to use a Help system under Windows, choose the Help|Using Help menu command.


Help|Using Help

The Help|Using Help command displays information on how to use Resource Workshop's Help system (or any other Help system under Windows).


Help|Getting Started

When you choose this menu command, you'll see information on what to do if you're a first time Resource Workshop user.


Help|Projects

When you choose this menu command, you'll see information on Resource Workshop projects. You'll learn what a project is and how to create one.


Help|Resources

When you choose this menu command, you'll see information on Resource Workshop resources. You'll learn how to create new resources and edit existing ones.


Help|Using Menus

When you choose this menu command, you'll see a list of Resource Workshop menus. You can go to the appropriate Help screen to find out what each menu is used for.


Help|Error Messages

When you choose this menu command, you'll see an alphabetical listing of all Resource Workshop error messages.


Help|Resource Script

When you choose this menu command, you'll see an alphabetical listing of the Resource Script Language elements.


Help|About Resource Workshop

When you choose this menu command, a dialog box appears, showing copyright and version information.

Click OK or press Esc, Alt+Spacebar+C, or Alt+F4 to close the box.


Control menu overview (desktop)
Control menu (Resource Workshop desktop)

The Control-menu box is on the far left of the title bar. Click it once or press Alt+Spacebar to display the menu.

The commands that appear on this menu affect the Resource Workshop desktop.

The Control menu commands are:

Restore

Move

Size

Minimize

Maximize

Close

Switch to


Control|Restore

When you choose the Restore command, the desktop window returns to its previous size.

This command is available only if the desktop window is maximized or minimized.


Control|Move

The Move command moves the desktop window. Use your arrow cursor keys to move it and press Enter when you are done.

You cannot use this command if the desktop is maximized.

You can also move the window by dragging its title bar.


Control|Size

With your keyboard, you can change the size of the desktop window with the Size command.

Use your arrow cursor keys to move the window borders. Press Enter when you are satisfied with the window size.

Size is available only if the desktop is not maximized.


Control|Minimize

Selecting the Minimize command turns the desktop into the Resource Workshop icon.

You can choose this command only if the desktop window has not been minimized already.


Control|Maximize

If you choose the Maximize command, the desktop zooms to fill your entire screen.

You can choose this command only if the desktop window has not been maximized already.


Control|Close

The Close command closes the desktop and unloads Resource Workshop from memory. You can also click the close box in the upper left corner of a window to close it.

If you have modified a project or resource, a dialog box appears asking you if you want to save the file before closing.


Control|Switch To

The Switch To command displays the Task List dialog box where you can switch from one application to another and rearrange application windows.


Task List dialog box

The Task List  dialog box lists all open applications.

If the application you want is in the list box, double-click on it to choose it.

From the keyboard:

-	Press the Up or Down arrow keys to reach the application you want.

−	Press Enter to choose it.

-	Then switch to the application and rearrange windows with the action buttons.


Action buttons

Action buttons are used in the Task List dialog box to switch to another application and rearrange application windows.

-	With the mouse, click the action button you want.

-	If you're using the keyboard, press Tab to go to the action button, then press Enter.

Switch To

The Switch To button switches to another application in the list box.

End Task

The End Task button closes the selected application in the list box.

Cascade

The Cascade button arranges the application windows in an overlap style.

Tile

The Tile button arranges the application windows in a tile fashion (side-by-side).

Arrange Icons

The Arrange Icons button evenly spaces the icons across the bottom of the desktop.


Compile menu overview
Compile menu

The Compile menu is displayed when you edit a resource's source script with the text editor.

The Compile menu command is Compile|Compile Now.


Compile|Compile Now
Compile|Compile Now (Alt+F9)

Use the Compile|Compile Now command to compile the resource's source script as you edit it.

If there's a compilation error, Resource Workshop displays an error message. Read the error message and click OK when you're done. Resource Workshop puts you back in the text editor so you can fix the error.


Menu menu overview (Menu editor)
Menu menu

The Menu menu is displayed when you create a menu. You use this menu to add pop-up menus, menu items, and menu separators to your menus. You can also insert a standard File, Edit, or Help pop-up menu and test your menu for duplicate IDs.

Here are the commands:

New Popup

New Menu Item

New Separator

New File Popup

New Edit Popup

New Help Popup

Check Duplicates


Menu|New Popup
Menu|New Popup (Ctrl+P)

The Menu|New Popup command inserts a new pop-up menu below the line that's currently highlighted in the Outline pane.


Menu|New Menu Item
Menu|New Menu Item (Ins)

The Menu|New Menu Item command inserts a new menu item below the line that's currently highlighted in the Outline pane.


Menu|New Separator
Menu|New Separator (Ctrl+S)

The Menu|New Separator command inserts a new separator below the line that's currently highlighted in the Outline pane.


Menu|New File Popup

The Menu|New File Popup command inserts a standard file pop-up menu below the line that's currently highlighted in the Outline pane.

The menu items on the file pop-up are:

-	New

-	Open

-	Save

-	Save as

-	Print

-	Page Setup

-	Printer Setup

-	Exit


Menu|New Edit Popup

The Menu|New Edit Popup command inserts a standard edit pop-up menu below the line that's currently highlighted in the Outline pane.

The menu items on the edit pop-up are:

-	Cut

-	Copy

-	Paste


Menu|New Help Popup

The Menu|New Help Popup command inserts a standard help pop-up menu belowline that's currently highlighted in the Outline pane.

The menu items on the help pop-up are:

-	Index

-	Keyboard

-	Commands

-	Procedures

-	Using Help

-	About


Menu|Check Duplicates

Use the Menu|Check Duplicates command to test your menu at any time. The test menu is updated as you make changes to your menu, so you can test changes as often as you want.

If there are duplicates, the Menu editor displays a message box with the message "Duplicate command value found." When you close this box, the Menu editor highlights the statement in the Outline pane that contains the duplicate value. You can type a new value in the Item ID input box.


View menu overview (Menu editor)
View menu (Menu editor)

The View menu is displayed when you create a menu. (This is different from the View menu that's displayed when you open a project or resource or the View menu that's displayed when you're using the Paint editor.)

Use this command to change the view of the Menu editor panes.

Here are the View commands:

View as Popup

First Graphic

Second Graphic


View|View as Pop-up
View|View as Popup

The View|View as Popup command controls whether the test menu is displayed on the menu bar or as a pop-up menu.

If you don't select this command, the test menu is displayed across the menu bar. Use this option if you're working on an entire menu at once.

However, if you develop menus as separate resources and the current menu you're working on is a pop-up menu, you can see it as it actually appears by selecting this command. The command Popup appears on the test menu; you select Popup to display the menu itself.


View|First Graphic

The View|First Graphic command represents the default configuration of the three panes.

It puts the dialog box  on the left, the test menu on the upper right, and the Outline pane on the lower right.


View|Second Graphic

The View|Second Graphic command is the alternate configuration of the three panes.

It puts the test menu at the top of the window and the dialog box and the Outline pane underneath.


Accelerator menu overview
Accelerator menu

The Accelerator menu is displayed when you create an accelerator.

Here are the Accelerator menu options:

New Item

Key Value

Check Dup Keys


Accelerator|New Item
Accelerator|New Item (Ins)

The Accelerator|New Item command inserts a new line in the Outline pane below the line that's currently highlighted.

You'll see two zeros in the outline and in the Command and Key input boxes in the Accelerator editor dialog box on the left. Use the dialog box to define the accelerator.


Accelerator|Key Value

The Accelerator|Key Value command is where you specify the key combination for users to press to invoke the accelerator. This command puts you in Key Value mode.

When you select this command, the Outline pane is replaced by instructions. The instructions tell you to enter the accelerator keys on the keyboard and click the mouse when you're done.


Accelerator|Check Duplicate Keys
Accelerator|Check Dup Keys

The Accelerator|Check Dup Keys command debugs your accelerator table by searching for duplicate key combinations.

If two accelerators use the same key combination, the Accelerator editor displays a message and highlights the second accelerator.

Make your changes and continue debugging your accelerator table with Accelerator|Check Dup Keys until you see an "OK" message.


Stringtable menu

The Stringtable menu is displayed when you're editing strings and string tables. You use this menu to add and delete string table items.

Here are the Stringtable menu options:

New Item

Delete Item

Change Item

Restore Item


Stringtable|New Stringtable item
Stringtable|New Item (Ins)

The Stringtable|New Item command inserts a new line below the line that's currently highlighted.


Stringtable|Delete Item

The Stringtable|Delete Item command deletes the line that's currently highlighted.


Stringtable|Change item
Stringtable|Change Item (Enter)

Use the Stringtable|Change Item command to edit the line that's currently highlighted. You can change the values in the ID Source and String input boxes.


Stringtable|Restore item
Stringtable|Restore Item (Esc)

The Stringtable|Restore Item command undoes your most recent changes.


Control menu overview (Dialog editor)
Control menu (Dialog editor)

The Control menu is displayed when you create a dialog box. (This is different from the Control menu box that's displayed on the left side of the menu bar.)

You use the Control menu to put controls in your dialog box.

Here are the Control menu options:

Style

Push Button

Radio Button

Horizontal Scroll Bar

Vertical Scroll Bar

List Box

Check Box

Group Box

Combo Box

Edit Text

Static Text

Icon

Black Frame

Black Rectangle

Custom


Control|Style

The Control|Style command opens the Window Style dialog box where you specify detailed information about the dialog box you're creating. This command is active only after you've selected the dialog box.


Control|Push Button

The Control|Push Button command turns the cursor into the Push Button tool.

To place the button, click in your dialog box where you want the button to appear. Or, double-click in the dialog box to place the button and bring up the Button Style dialog box, where you customize the button.


Control|Radio Button

The Control|Radio Button command turns the cursor into the Radio Button tool.

To place the button, click in your dialog box where you want the button to appear. Or, double-click in the dialog box to place the button and bring up the Button Style dialog box, where you customize the button.


Control|Horizontal Scroll Bar

The Control|Horizontal Scroll Bar command turns the cursor into the Horizontal Scroll Bar tool.

To place the scroll bar, click in your dialog box where you want the scroll bar to appear. Or, double-click in the dialog box to place the scroll bar and bring up the Scroll Bar Style dialog box, where you customize the scroll bar.


Control|Vertical Scroll Bar

The Control|Vertical Scroll Bar command turns the cursor into the Vertical Scroll Bar tool.

To place the scroll bar, click in your dialog box where you want the scroll bar to appear. Or, double-click in the dialog box to place the scroll bar and bring up the Scroll Bar Style dialog box, where you customize the scroll bar.


Control|List Box

The Control|List Box command turns the cursor into the List Box tool.

To place the list box, click in your dialog box where you want the list box to appear. Or, double-click in the dialog box to place the list box and bring up the List Box Style dialog box. where you customize the list box.


Control|Check Box

The Control|Check Box command turns the cursor into the Check Box tool.

To place the check box, click in your dialog box where you want the check box to appear. Or, double-click in the dialog box to place the check box and bring up the Button Style dialog box, where you customize the check box.


Control|Group Box

The Control|Group Box command turns the cursor into the Group Box  tool.

To place the group box, click in your dialog box where you want the group box to appear. Or, double-click in the dialog box to place the group box and bring up the Button Style dialog box, where you customize the group box.


Control|Combo Box

The Control|Combo Box command turns the cursor into the Combo Box tool.

To place the combo box, click in your dialog box where you want the combo box to appear. Or, double-click in the dialog box to place the combo box and bring up the Combo Box Style dialog box, where you customize the combo box.


Control|Edit Text

The Control|Edit Text command turns the cursor into the Edit Text tool. Place the edit text in your dialog box by moving the cursor. Then double-click the mouse.

To place edit text, click in your dialog box where you want the text to appear. Or, double-click in the dialog box to place the text and bring up the Edit Text Style dialog box, where you customize the text.


Control|Static Text

The Control|Static Text command turns the cursor into the Static Text tool.

To place the static text, click in your dialog box where you want the static text to appear. Or, double-click in the dialog box to place the static text and bring up the Static Style dialog box, where you customize the static text.


Control|Icon

The Control|Icon command turns the cursor into the Icon tool.

To place the icon, click in your dialog box where you want the icon to appear. Or, double-click in the dialog box to place the icon and bring up the Static Style dialog box, where you customize the icon.


Control|Black Frame

The Control|Black Frame command turns the cursor into the Black Frame tool.

To place the frame, click in your dialog box where you want the frame to appear. Or, double-click in the dialog box to place the frame and bring up the Static Style dialog box, where you customize the frame.


Control|Black Rectangle

The Control|Black Rectangle command turns the cursor into the Black Rectangle tool.

To place the rectangle, click in your dialog box where you want the rectangle to appear. Or, double-click in the dialog box to place the rectangle and bring up the Static Style dialog box, where you customize the rectangle.


Control|Custom

The Control|Custom command displays the New Custom Control dialog box, where you can put a control in your dialog box that doesn't fit into any of the predefined Window types.

If you've installed a Borland custom control library, you'll see the Borland custom control tools in the far right column of the Tools palette.


Align menu overview
Align menu

The Align menu is displayed when you create dialog boxes. It lets you align the controls in your dialog box.

Here are the Align menu options:

Align

Size

Array

Grid


Align|Align

The Align|Align commands brings up the Align Controls dialog box where you align controls. This command is available only if you've already selected two or more controls.


Align Controls dialog box overview
Align Controls dialog box

The Align Controls dialog box is where you align controls.

You can use radio buttons or accelerators to align controls. To use accelerators, select the controls in a sizing frame. Then press Ctrl plus the short cut key. To use the short cut for the Space Equally (Horizontal or Vertical) radio button, press Ctrl plus the left mouse button and drag a corner of the sizing frame.

Vertical Alignment radio buttons

The Vertical radio buttons align the selected controls vertically.

Horizontal Alignment radio buttons

The Horizontal radio buttons align the selected controls horizontally.


Vertical Alignment radio buttons

Turn on one or more of the Vertical Alignment radio buttons to move the selected controls vertically. Most options are enabled only if you select two or more controls first.

No Change (Ctrl)

Turn on the No Change radio button if you don't want the controls to move vertically.

Tops (T)

Turn on the Tops radio button to move the controls vertically so they are aligned along the top of the sizing frame.

Centers (V)

Turn on the Centers radio button to move controls vertically so they are aligned in the center of the sizing frame.

Bottoms (B)

Turn on the Bottoms radio button to move controls vertically so they are aligned at the bottom of the sizing frame.

Space Equally (Strch)

Turn on the Space Equally radio button to move controls vertically so they are spaced evenly within the sizing frame.

Center in Dialog (C)

Turn on the Controls radio button to move the sizing frame vertically so that it's centered in the dialog box.


Horizontal Alignment radio buttons

Turn on one or more of the Horizontal Alignment radio buttons to move the selected controls horizontally. Most options are enabled only if you select two or more controls first.

No Change (Ctrl)

Turn on the No Change radio button if you don't want the controls to move horizontally.

Left Sides (L)

Turn on the Left Sides radio button to move the controls horizontally so they are aligned along the left side of the sizing frame.

Centers (H)

Turn on the Centers radio button to move controls horizontally so they are aligned in the center of the sizing frame.

Right Sides (R)

Turn on the Right Sides radio button to move controls horizontally so they are aligned along the right side of the sizing frame.

Space Equally (Strch)

Turn on the Space Equally radio button to move controls horizontally so they are spaced evenly within the sizing frame.

Center in Dialog (D)

Turn on the Center in Dialog radio button to move the sizing frame horizontally so that it's centered in the dialog box.


Align|Size

Depending on whether you've selected controls or the entire dialog box, the Align|Size command brings up the Size Controls dialog box or the Size Dialog dialog box where you resize groups of controls or the dialog box itself.

This command is only available if you've already selected one or more controls or the dialog box.


Size Controls dialog box overview
Size Controls dialog box

The Size Controls dialog box is where you specify the starting point, the height, and the width of controls in the dialog box.

CX-coordinate input box

The CX-coordinate input box is where you define the width of the selected controls.

CY-coordinate input box

The CY-coordinate input box is where you define the height of the selected controls.

Horizontal Size radio buttons

The Horizontal radio buttons size the width of the selected controls.

Vertical Size radio buttons

The Vertical radio buttons size the height of the selected controls.

X-coordinate input box

The X-coordinate input box is where you define the starting point of the selected controls.

Y-coordinate input box

The Y-coordinate input box is where you define the starting point of the selected controls.


Horizontal Size radio buttons (Size Controls dialog box)
Horizontal Size radio buttons

Turn on one of the Horizontal Size radio buttons to size the width of the selected controls. Most options are enabled only if you select two or more controls first.

No Change

Turn on the No Change radio button if you don't want the controls to change size horizontally.

Set by Windows

The Set by Windows radio button lets Windows position your dialog box. This radio button is active only when you select the dialog box. When you turn this radio button on, the X Coordinate input box is disabled and Resource Workshop inserts 0x8000, the required value, into the X field.

Grow To Largest

Turn on the Grow To Largest radio button to resize controls horizontally so that they're as wide as the widest control in the selected group.

Width Of Size Box

Turn on the Width Of Size radio button to resize controls so that they're as wide as the sizing frame.

Width Of Dialog

Turn on the Width Of Dialog radio button to resize controls so that they're as wide as the dialog box.

Enter Values

Turn on the Enter Values radio button to specify a control's X and CX- coordinates. This radio button is active only if you've selected a single control.


Vertical Size radio buttons (Size Controls dialog box)
Vertical Size radio buttons

Turn on one of the Vertical Size radio buttons to size the height of the selected controls. Most options are enabled only if you select two or more controls first.

No Change

Turn on the No Change radio button if you don't want the controls to change size vertically.

Shrink To Smallest

Turn on the Shrink To Smallest radio button to resize controls vertically so that they're only as tall as the shortest control in the selected group.

Grow To Largest

Turn on the Grow To Largest radio button to resize controls vertically so that they're as tall as the tallest control in the selected group.

Height Of Size Box

Turn on the Height Of Size radio button to resize controls so that they're as tall as the sizing frame.

Height Of Dialog

Turn on the Height Of Dialog radio button to resize controls so that they're as tall as the dialog box.

Enter Value

Turn on the Enter Value radio button to specify a control's Y- and CY- coordinates. This radio button is active only if you've selected a single control.


X-coordinate input box

The X-coordinate input box is where you define the starting point of the controls or the dialog box in dialog units. It works in conjunction with the Y-coordinate input box.

This input box is only active if you've selected the dialog box or a single control and turned on the Horizontal Size Enter Values radio button.


Y-coordinate input box

The Y-coordinate input box is where you define the starting point of the controls or the dialog box in dialog units. It works in conjunction with the X-coordinate input box.

This input box is only active if you've selected the dialog box or a single control and turned on the Vertical Size Enter Value radio button.


CX-coordinate input box

The CX-coordinate input box is where you define the horizontal width of the controls or the dialog box in dialog units. It works in conjunction with the CY-coordinate input box.

This input box is only active if you've selected the dialog box or a single control and turned on the Horizontal Size Enter Values radio button.


CY-coordinate input box

The CY-coordinate input box is where you define the vertical height of the controls or the dialog box in dialog units. It works in conjunction with the CX-coordinate input box.

This input box is only active if you've selected the dialog box or a  single control and turned on the Vertical Size Enter Value radio button.


Size Dialog dialog box overview
Size Dialog dialog box

The Size Dialog dialog box is where you specify the starting point, the height, and the width of the dialog box.

CX-coordinate input box

The CX-coordinate input box is where you define the width of the dialog box.

CY-coordinate input box

The CY-coordinate input box is where you define the height of the dialog box.

Horizontal Size radio buttons

The Horizontal radio buttons size the width of the dialog box.

Vertical Size radio buttons

The Vertical radio buttons size the height of the dialog box.

X-coordinate input box

The X-coordinate input box is where you define the starting point of the dialog box.

Y-coordinate input box

The Y-coordinate input box is where you define the starting point of the dialog box.


Horizontal Size radio buttons (Size Dialog dialog box)

Turn on one of the Horizontal Size radio buttons to size the width of the dialog box.

No Change

Turn on the No Change radio button if you don't want the dialog box to change size horizontally.

Enter Values

Turn on the Enter Values radio button to specify the dialog box's X- and CX- coordinates.


Vertical Size radio buttons (Size Dialog dialog box)

Turn on one of the Vertical Size radio buttons to size the height of the dialog box.

No Change

Turn on the No Change radio button if you don't want the dialog box to change size vertically.

Enter Value

Turn on the Enter Value radio button to specify a dialog box's Y- and CY- coordinates.


Align|Array

The Align|Array command brings up the Form Controls Into An Array dialog box where you format controls. This command also numbers each control as a member of the array group.

Align|Array is only available if you've already selected two or more controls.


Form Controls Into Array dialog box overview
Form Controls Into An Array dialog box

The Form Controls Into An Array dialog box is where you form groups of controls into arrays of rows and columns.

Array Layout input boxes

The Array Layout input boxes arrange controls into an array.

Order radio buttons

The Order radio buttons choose the order of the controls.


Array Layout input boxes (Form Controls Into Array dialog box)
Array Layout input boxes

The Array Layout input boxes are where you arrange a group of controls in rows and columns.


Rows input box (Form Controls Into Array dialog box)
Rows input box

Enter the number of rows in which you want to arrange the controls in the Rows input box.


Column input box (Form Controls Into Array dialog box)
Column input box

Enter the number of columns in which you want to arrange the controls in the Column input box.


Order radio buttons (Form Controls Into Array dialog box)
Order radio buttons

Choose how you want to order the controls in the selected group by turning on one of the Order radio buttons.

Left To Right

Turn on the Left To Right radio button to order the controls from left to right.

Top To Bottom

Turn on the Top To Bottom radio button to order the controls from top to bottom.


Align|Grid

The Align|Grid command brings up the Set Grid Attributes dialog box where you define a grid to help align controls.


Set Grid Attributes dialog box overview
Set Grid Attributes dialog box

The Set Grid Attributes dialog box is where you specify a grid.

Width input box

The Width input box is where you specify the width of the grid.

Height input box

The Height input box is where you specify the height of the grid.

Grid Type radio buttons

The Grid Type radio buttons determine the type of grid.

Show Grid check box

The Show Grid check box displays the grid.


Width input box (Set Grid Attributes dialog box)
Width input box

Enter the width of each cell in the grid in the Width input box.


Height input box (Set Grid Attributes dialog box)
Height input box

Enter the height of each cell in the grid in the Height input box.


Grid Type radio buttons

The Grid Type radio buttons control whether the controls snap onto the grid lines when you move them.

Absolute

Turn on the Absolute radio button if you want the controls to snap to the nearest grid line.

Relative

Turn on the Relative radio button to move the control only in increments of the grid width horizontally and the grid height vertically.


Show Grid check box

Turn on the Show Grid check box to display the grid.


Options menu overview (Dialog editor)
Options menu (Dialog editor)

The Options menu lets you choose options for the Dialog editor. (This is different from the Options menu that's displayed when you edit a bitmapped resource.)

Here are the Options commands:

Hide Tools

Hide Alignment

Hide Caption

Modify Controls

Set Tabs

Set Groups

Set Order

Test Dialog

Preferences

Install Control Library

Redraw Now


Options|Hide Tools

The Options|Hide Tools command hides the Tools palette. This command is a toggle-when the Tools palette is hidden, the command changes to Show Tools.


Options|Hide Alignment

The Options|Hide Alignment command hides the Alignment palette. This command is a toggle-when the Align palette is hidden, the command changes to Show Align.


Options|Hide Caption

The Options|Hide Caption command hides the Caption window. This command is a toggle-when the Caption palette is hidden, the command changes to Show Caption.


Options|Modify Controls

The Options|Modify Controls command puts you in edit mode where you modify the controls in your dialog box.


Options|Set Tabs

The Options|Set Tabs command assigns a tab stop to a control. Users can press Tab to move to that control.

When you choose Options|Set Tabs, the mouse cursor turns into a Tab icon. Resource Workshop surrounds any controls currently set as tab stops with a gray box.

To change the Tab Stop attribute for a control, put the cross hair of the Tab icon in the control and click. The Set Tabs option works as a toggle, turning the Tab Stop check box on or off.

When you finish setting tab stops, choose Options|Modify Controls. This returns you to edit mode.


Options|Set Groups

The Options|Set Groups command defines groups of controls in which users can move around using the arrow keys. You usually assign the first control in the group to a tab stop with the Options|Set Tabs command.

Here's how to define groups of controls:

1.	If necessary, move the controls so that they're together.

2.	Choose Options|Set Groups. The mouse cursor turns into a G icon.

3.	For each group you want to define, click the first member so it's surrounded by a gray box.

-	If any control that you don't want to define as the first member of a group is surrounded by a gray box, click the gray box to remove it from the control.

-	You don't have to identify the last member of a group. By clicking the first member of each group, you also identify the last member of the previous group.

4.	When you finish identifying the first member in each group, choose Options|Modify Controls. This returns you to edit mode.


Options|Set Order

The Options|Set Order command specifies the order of controls in your dialog box. Here's how you use it:

1.	Choose the controls whose order you want to change. You can click and drag to select a group of controls.

You don't need to select any controls if you want to specify the order for all controls in the dialog box.

2.	Choose Options|Set Order. The mouse cursor turns into a 1,2 icon.

Each control is numbered to show its current place in the overall order. If you chose just some of the controls in step 1, you'll see the order numbers only for those controls.

Notice the Next Item prompt at the bottom of the Dialog editor. It tells you the order number that Resource Workshop assigns to the next control you click.

3.	Click the items you want to assign new order numbers to. The Dialog editor displays a gray box around all the controls you've already picked. Once you've clicked a control to assign it an order number, you can't pick the same control again.

If you make a mistake and want to go back to the original order, just click on all the controls. Then choose Edit|Undo Order Group (or press Alt+Backspace).

4.	When you finish assigning new order numbers, choose Options|Modify Controls. This returns you to edit mode.


Options|Test Dialog

Use the Option|Test Dialog command to test how the controls in your dialog box work. You can test how the Tab and arrow keys move you around, or how text you type is scrolled in an edit text control. Choose Options|Test Dialog to leave test mode.

When you test a dialog box, the status line at the bottom of the Dialog editor says Test.


Options|Preferences

The Options|Preferences command displays the Preferences dialog box where you set preferences for the way the Dialog editor works.


Preferences dialog box overview (Dialog editor)
Preferences dialog box

The Preferences dialog box is where you customize the Dialog editor.

Draw Custom Controls As Frames check box

The Draw Custom Controls as Frames check box displays an approximation of a custom control

Drawing Type radio buttons

The Drawing Type radio buttons determine how elements of your dialog box are displayed in the Dialog editor.

Generate Control Statement check box

The Generate Control Statements Only check box generates CONTROL statements.

Selection Border radio buttons

The Selection Border radio buttons choose how the frame around the selected control is displayed.

Selection Options check boxes

The Selection Options check boxes choose how the selection feature behaves when you select controls to customize.

Status Line Units radio button

The Status Line Units radio buttons determine the unit of measurement the status line uses to display information.


Status Line Units radio buttons

The Status Line Units radio buttons determine the unit of measurement the status line uses to display information. You can display measurements using screen units, but the Dialog editor itself always uses dialog unit measurements.

Dialog

Turn on the Dialog radio button if you want the status line units to display in dialog units.

Screen

Turn on the Screen radio button if you want the status line units to display in pixels.


Selection Border radio buttons

The Selection Border radio buttons choose how the frame around the selected control is displayed. You can resize and move objects no matter which option you choose.

Thick Frame

Turn on the Thick Frame radio button to display a thick sizing frame around the selected control.

Handle

Turn on the Handle radio button to display sizing handles around the selected control.


Generate Control Statements Only check box

Turn on the Generate Control Statements Only check box if you want a CONTROL statement, instead of BUTTON, COMBOBOX, SCROLLBAR etc. statement, to define a control. For example, if you're adding a list box to your dialog box and you choose this option, Resource Workshop generates a CONTROL statement instead of a LISTBOX statement.


Drawing Type radio buttons

The Drawing Type radio buttons determine how elements of your dialog box are displayed in the Dialog editor.

Draft

Turn the Draft radio button on to show a "wire frame" view of the controls. This option shows the borders for all controls, even if they're not selected. The Dialog editor displays the control ID in the frame.

Normal

Turn the Normal radio button on to show the border for a control only if it's selected. This is the default.

WYSIWYG

Turn on the WYSIWYG radio button to see what your dialog box will look like when it's in your application.

Turning the WYSIWYG radio button on is slower. Usually, it's best to pick Normal as the Drawing Type, then choose the Options|Test Dialog command whenever you want to see what the final form of the dialog box will look like.


Selection Options check boxes

The Selection Options check boxes choose how the selection feature behaves when you select controls to customize.

Select Near Border check box

The Select Near Border check box selects a control by clicking near its border.

Selection Rectangle Surrounds check box

The Selection Rectangle Surrounds check box selects a control when it's entirely surrounded by the selection rectangle.


Select Near Border check box

Turn the Select Near Border check box on if you want to select a control by clicking near its border.


Selection Rectangle Surrounds check box

Turn the Selection Rectangle Surrounds check box on if you want to select a control by surrounding it entirely with the selection rectangle.

If you are working with closely space controls, you may want to turn this option on to get finer control and avoid selecting controls inadvertently.


Draw Custom Controls as Frames check box

Turn on the Draw Custom Controls as Frames check box if you want the Dialog editor to display an approximation of a custom control. This option is active only if you've turned the Normal radio button on.


Options|Install Control Library

The Options|Install Control Library command displays the Install a New Control Library dialog box where you can install a new control library.


Install a New Control Library dialog box overview
Install a New Control Library dialog box

The Install a New Control Library dialog box is where you install a dynamic link library (.DLL) file. A .DLL file contains a custom control library.

File input box

Enter the name of the file in the File input box

Files drop-down box

Choose the file from the Files drop-down box.

Directories drop-down box

Choose the directory from the Directories drop-down box.

When the .DLL file is installed, the custom controls in that .DLL will be available just like any standard Windows control.

If you install the Borland custom control library, you'll see the Borland custom control tools on the Tools palette.


File input box

Enter the name of the dynamic link library (.DLL) file in the File input box. The current directory path is displayed below the input box.


Files drop-down box

Choose dynamic link library (.DLL) file from the Files drop-down box. Just select the file name and double-click it.


Directories drop-down box

You can change the directory path by choosing a new directory in the Directories drop-down box. Just select the directory name and double-click it. The new path is displayed below the File input box.


Options|Redraw Now

The Options|Redraw Now command redraws the dialog box.


View menu overview (Paint editor)
View menu (Paint editor)

The View menu is displayed when you use the Paint editor. (This is different from the View menu that's displayed when you open a project or resource or the View menu that's displayed you're editing a menu.)

Use this menu to choose how your image is displayed.

Here are the View menu options:

View|Zoom In

View|Zoom Out

View|Actual Size

View|CGA Resolution [32 x 16]

View|Split Horizontal

View|Split Vertical


View|Zoom In
View|Zoom In (Ctrl+Z)

The View|Zoom In command zooms the entire image in the currently selected window. Resource Workshop increases magnification to the next higher multiple of 400%, but no more than 1600%.

The Paint editor uses the center of the image as a reference when zooming the entire image.

See Also

Zooming images


View|Zoom Out
View|Zoom Out (Ctrl+O)

The View|Zoom Out command zooms out the entire image in the currently selected window. Resource Workshop decreases magnification to the next lower multiple of 400%, but no less than the actual size of the image (100%).

The Paint editor uses the center of the image as a reference when zooming the entire image.

See Also

Zooming images


View|Actual Size
View|Actual Size (Ctrl+A)

The View|Actual Size command returns a zoomed image to its actual size.

See Also

Zooming images


View|CGA Resolution
View|CGA Resolution [32 x 16]

When you're editing cursors and icons, the View|CGA Resolution [32 x 16] command is displayed. (It's not available when you edit fonts and bitmaps.)

Use this command to see what your image would look like on a CGA screen. Choosing this command puts the image in actual size and displays it in 32 x 16 format.

All you change with this command is the view of the icon or cursor-if it was a 32 x 32 pixel icon or cursor, it still is. Note that Resource Workshop creates only 32 x 32 pixel cursors.

To exit CGA Resolution mode, choose one of the Zoom commands.


View|Split Horizontal

Use the View|Split Horizontal to split the Paint editor screen horizontally. This displays one  window pane on top of the other.

This command is available only if the screen is split vertically.


View|Split Vertical

Use View|Split Vertical to split the Paint editor screen vertically. This displays the two window panes side-by-side.

This command is available only if the screen is split horizontally.


Text menu overview
Text menu

The Text menu is displayed when you use the Paint editor. You use this menu to choose how the text in your resource is displayed.

Here are the Text menu commands:

Text|Align Left

Text|Align Center

Text|Align Right

Text|Font


Text|Align Left

The Text|Align Left command aligns text to the left of where you initially clicked before tying the text.

For example, if you choose Text|Align Left and then use the Text tool to type characters on your image, the characters move towards the right side of your image. They're aligned with the original click on the left.

Use the Text|Align Left command before you type text or immediately after you finish typing. After you click to make another selection, you can't change the alignment of the text you've just typed.


Text|Align Center

The Text|Center command centers text. The text is centered in relationship to where you initially clicked before tying the text.

For example, if you choose Text|Center and then use the Text tool to type characters on your image, the characters move towards the center of your image. They are centered in the image in relationship to your original click position.

Use the Text|Center command before you type text or immediately after you finish typing.

After you click to make another selection, you can't change the alignment of the text you've just typed.


Text|Align Right

The Text|Align Right command aligns text to the right of where you initially clicked before tying the text.

For example, if you choose Text|Align Right and then use the Text tool to type characters on your image, the characters move towards the left side of your image. They're aligned with the original click on the right.

Use the Text|Align Right command before you type text or immediately after you finish typing. After you click to make another selection, you can't change the alignment of the text you've just typed.


Text|Font

The Text|Font command brings up the Select Font dialog box, where you choose the typeface, size, and style of the text.

Use this command either before you type text or immediately after you finish typing. After you click to make another selection, you can't change the font of the text you've just typed.


Options menu overview (Paint editor)
Options menu (Paint editor)

The Options menu is displayed when you use the Paint editor. (This is different from the Options menu that's displayed when you edit a dialog box.)

Use this menu to choose options for the Paint editor.

Here are the Options menu commands:

Align

Size

Pattern

Brush Shape

Air Brush Shape

Pen Style

Editor Options


Options|Align

The Options|Align command brings up the Align Selection dialog box, where you align your image.

This command is only available once you've selected an area of the image with the Pick Rectangle tool or the Scissors tool.


Align Selection dialog box overview
Align Selection dialog box

The Align Selection dialog box is where you align the area of the image you've selected. You align the selected area by moving it vertically and horizontally.

Before you use this dialog box, you should zoom the image. Then, display a grid on the zoomed image. Using a grid makes it easy to align the selected area. The grid represents screen pixel coordinates.


Vertical radio buttons

The Vertical radio buttons align the selected area vertically within the image. After you've changed the area's alignment, it will be in the same column of the grid as its current location; only its row alignment will change.

No Change

Turn on the No Change radio button if you don't want to change the selected area's vertical alignment. This is the default.

Top

Turn on the Top radio button if you want to move the selected area to the top of the image.

Center

Turn on the Center radio button if you want to move the selected area to the center of the image.

Bottom

Turn on the Bottom radio button if you want to move the selected area to the bottom of the image.


Horizontal radio buttons

The Horizontal radio buttons align the selected area horizontally within the image. After you've changed the area's horizontal alignment, it will be in the same row of the grid as its current location; only its column alignment will change.

No Change

Turn on the No Change radio button if you don't want to change the selected area's horizontal alignment. This is the default.

Left Side

Turn on the Left Side radio button if you want to move the selected area to the left side of the image.

Center

Turn on the Center radio button if you want to move the selected area to the center of the image.

Right Side

Turn on the Right Side radio button if you want to move the selected area to the right side of the image.


Options|Size

The Options|Size command brings up the Stretch Selection dialog box where you size the image.

This command is only available once you've selected an area of the image with the Pick Rectangle tool or the Scissors tool.


Stretch Selection dialog box overview
Stretch Selection dialog box

The Stretch Selection dialog box is where you stretch the area of the image you've selected. You stretch the selected area by new screen pixel coordinates in the New Position/Size input boxes.

Before you use this dialog box, you should zoom the image. Then, display a grid on the zoomed image. Using a grid makes it easy to align the selected area.

The Old Position/Size display boxes on the left side of the dialog box show the current position (Top, Left) and size (Width, Height) of the selected area.


New Position/Size input boxes

The New Position/Size input boxes are where you enter the new position and size of the selected area. The values represent pixel coordinates that are represented on the grid that you've displayed on the zoomed image.

You first position the image by entering pixel coordinates in the Left and Top input boxes. Then, you size the image with the Width and Height input boxes.

For example, a value of 10 in the Left input box places the selected area in column 10, the 10th column from the left side of the image. A value of 5 in the Top input box positions the selected area in Row 5; the 5th row down from the top of the image.


Left input box

In the Left input box, enter the number of the column in which you want to position the left side of the selected area. This value does not stretch the area, but simply places it in the new column.


Top input box

In the Top input box, enter the number of the row in which you want to position the top of the selected area. This value does not stretch the area, but simply places it in the new row.


Width input box (Stretch Selection dialog box)
Width input box

Enter the new value for the width of the selected area in the Width input box. This is the number of the column in which you want to place the right side of the area. By entering a value that's greater than the selected area's width, you can stretch the area.


Height input box (Stretch Selection dialog box)
Height input box

Enter the new value for the height of the selected area in the Height input box. This is the number of the row where you want to place the bottom of the area. By entering a value that's greater than the selected area's height, you can stretch the area.


Options|Pattern

The Options|Pattern command brings up the Set Pattern dialog box, where you choose paint patterns.


Set Pattern dialog box overview
Set Pattern dialog box

The Set Pattern dialog box is where you choose a pattern for all tools that paint a pattern on your image.

These tools are the:

Airbrush

Filled Ellipse

Filled Rectangle

Filled Rounded Rectangle

Paintbrush

The current pattern is displayed at the top of the dialog box. To choose a new pattern, just click on the pattern and click OK.

The next time you use a tool capable of filling with a pattern, Resource Workshop uses the pattern you specify. This pattern stays the same until you specify a new one.


Options|Brush Shape

The Options|Brush Shape command brings up the Brush Shape dialog box.


Brush Shape dialog box overview
Brush Shape dialog box

The Brush Shape dialog box is where you choose a pattern for the Paintbrush tool.

The current pattern is displayed at the top of the dialog box. To choose a new pattern, just click on the pattern and click OK.

The next time you use the Paintbrush tool, Resource Workshop uses the pattern you specify. This pattern stays the same until you specify a new one.


Options|Air Brush Shape

The Options|Air Brush Shape command brings up the Airbrush Shape dialog box.


Air Brush Shape dialog box overview
Airbrush Shape dialog box

The Airbrush Shape dialog box is where you choose a pattern for the Airbrush tool.

The current pattern is displayed at the top of the dialog box. To choose a new pattern, just click on the pattern and click OK.

The next time you use the Airbrush tool, Resource Workshop uses the pattern you specify. This pattern stays the same until you specify a new one.


Options|Pen Style

The Options|Pen Style command brings up the Set Pen Style dialog box, where you choose the line width.


Set Pen Style dialog box overview
Set Pen Style dialog box

The Set Pen Style dialog box is where you choose the line width for tools that draw a line.

These tools are the:

Ellipse

Line

Pen

Rectangle

Rounded Rectangle

The current pattern is displayed at the top of the dialog box. To choose a new pattern, just click on the pattern and click OK.

Notice the null choice for a pen width. You can use null when you want to paint filled-in frames that don't have a border.

The next time you use a tool that draws a line, Resource Workshop uses the pattern you specify. This pattern stays the same until you specify a new one.


Options|Set Paint Editor Options
Options|Editor Options

The Options|Set Paint Editor Options command brings up the Set Paint Editor Options dialog box where you set options for the Paint editor.


Set Paint Editor Options dialog box overview
Set Paint Editor Options dialog box

The Set Paint Editor Options dialog box is where you customize the Paint editor.

Draw On Both Images check box

The Draw On Both Images check box updates the image in both window panes.

Grid On Zoomed Windows check box

The Grid On Zoomed Windows check box displays a grid on a zoomed window.

Save With Default Device Colors check box

The Save With Default Device Colors saves the default Colors palette.


Draw On Both Images check box

Turn on the Draw On Both Images check box if you want the Paint editor to update the image in both window panes as you draw.

If you turn this check box off, the Paint editor updates the other image only after you finish drawing an element.

Turn this option off if you find that performance is sluggish while you're drawing.


Grid on zoomed images check box
Grid On Zoomed Windows check box

Turn on the Grid On Zoomed Windows check box if you want to display a grid on a zoomed image. The grid shows you how the image is painted on a pixel-by-pixel basis.

The grid makes it easy to use the Options|Align and Options|Size commands to align and size the selected area of the image.


Save With Default Device Colors check box

Turn the Save With Default Device Colors check box off if you want to save a custom Colors palette you've created. When this check box is on, any colors you've customized in the color palette will revert to the default color when you close the Paint editor. This option applies only to a 256-color palette.


Images menu overview
Images menu

The Images menu is displayed when you open an icon image. Use this menu to create a new image or edit an existing image.

Here are the Images menu options:

New Image

Edit Image


Image|New Image

The Image|New Icon Image command brings up the New Icon Image dialog box.


New Icon Image dialog box overview
New Icon Image dialog box

The New Icon Image dialog box is where you choose the size and color format for a new image.

Size radio buttons

The Size radio buttons determine the image's pixel size.

Colors radio buttons

The Colors radio buttons determine the number of colors in the image.


Size radio buttons

The Size radio buttons let you choose the image's size.

32 x 32

Turn the 32 x 32 radio button on if you want the icon to be in a 32 x 32 pixel format.

32 x 16

Turn the 32 x 16 radio button on if you want the icon to be in a 32 x 16 pixel format.


Colors radio buttons (New Icon Image dialog box)
Colors radio buttons

The Colors radio buttons let you choose the image's color format.

2 Colors

Turn on the 2 Colors radio button if you want the icon to be a black and white image.

8 colors

Turn on the 8 Colors radio button if you want the icon to be an 8-color image.

16 colors

Turn on the 16 Colors radio button if you want the icon to be a 16-color image.

256 colors

Turn on the 256 Colors radio button if you want the icon to be a 256-color image. This button is available only if your display hardware supports 256 colors. Your program must supply its own support for 256 colors.


Device Info Button

The Device Info button brings up the Display Device Information dialog box.


Display Device Information dialog box

The Display Device Information displays information about your display hardware.

It shows the number of bits per pixel, number of planes, and number of colors supported by your device.

Click OK when you've finished reviewing the information.


Image|Edit Image

The Image|Edit Image command puts you in the Paint editor where you can edit the selected icon image.


Icon menu overview
Icon menu

The Icon menu is displayed when you work with icons.

Here are the Icon menu options:

Hide Palette

Hide Toolbox

Size and Attributes

Test

Edit Foreground Color

Edit Background Color


Icon|Hide Palette

The Icon|Hide Palette command hides the Paint editor Colors palette. This command is available when the Colors palette is displayed.

If you hide the Colors palette, the command switches to Show|Palette.


Hide Toolbox

The Hide Toolbox command hides the Paint editor Tools palette. This command is available when the Tools palette is displayed.

If you hide the Tools palette, the command switches to Show|Toolbox.


Icon|Size and Attributes

The Icon|Size and Attributes command brings up the Icon Image Attributes dialog box.


Icon Image Attributes dialog box overview
Icon Image Attributes dialog box

The Icon Image Attributes dialog box is where you change an icon's size and color format.

Size radio buttons

The Size radio buttons determine the image's pixel size.

Colors radio buttons

The Colors radio buttons determine the number of colors in the image.

Device Info Button

The Device Info button displays information about your display hardware.


Icon|Test

Use the Icon|Test command to move your icon around and test its transparent and inverted areas against various backgrounds.


Icon|Edit Foreground Color

If you've selected a color from the Colors palette for the foreground color, the Icon|Edit Foreground Color command brings up the Edit Color dialog box.

If you've selected Transparent or Inverted for the foreground color, this command brings up the Set Transparent Color dialog box.


Icon|Edit Background Color

If you've selected a color from the Colors palette for the background color, the Icon|Edit Background Color command brings up the Edit Color dialog box.

If you've selected Transparent or Inverted for the background color, this command brings up the Set Transparent Color dialog box.


Cursor menu overview
Cursor menu

The Cursor menu is displayed when you work with cursors.

Here are the Cursor menu options:

Hide Palette

Hide Toolbox

Set Hot Spot

Test

Set Transparent Color


Cursor|Hide Palette

The Cursor|Hide Palette command hides the Paint editor Colors palette. This command is available when the Colors palette is displayed.

If you hide the palette, the command switches to Show|Palette.


Cursor|Set Hot Spot

The Cursor|Set Hot Spot command brings up the Set Hot Spot dialog box, where you identify the cursor's active area.


Set Hot Spot dialog box overview
Set Hot Spot dialog box

The Set Hot Spot dialog box is where you enter the pixel coordinates of the cursor's hot spot (active area).

Horizontal input box

The Horizontal input box is where you enter the horizontal coordinate of the cursor's hot spot.

Vertical input box

The Vertical input box is where you enter the vertical coordinate of the cursor's hot spot.


Horizontal input box

In the Horizontal input box, enter the x pixel coordinate of the cursor's hot spot.

See Also

Setting a cursor's hot spot


Vertical input box

In the Vertical input box, enter the y pixel coordinate of the cursor's hot spot.

See Also

Setting a cursor's hot spot


Cursor|Test

Use the Cursor|Test command to move your cursor around and see how it looks on different color backgrounds.

Here's how you test the cursor's hot spot,

1.	Use the View|Zoom In command to zoom in on the cursor image.

2.	Display a grid on the zoomed image.

3.	Select the Paint Can tool.

4.	Choose Cursor|Test.

5.	Move the hot spot to a particular pixel on the zoomed image and click the mouse. The test cursor disappears and is replaced by the Paint Can tool. If you correctly set the hot spot, the paint tool points to the same pixel your test cursor pointed to.


Cursor|Set Transparent Color

The Cursor|Set Transparent Color command brings up the Set Transparent Color dialog box, where you can change the color of the cursor's transparent and inverted areas.


Bitmap menu overview
Bitmap menu

The Bitmap menu is displayed when you work with bitmaps.

Here are the Bitmap menu options.

Hide Palette

Hide Toolbox

Size and Attributes

Edit Foreground Color

Edit Background Color


Bitmap|Hide Palette

The Bitmap|Hide Palette command hides the Paint editor Colors palette. This command is available when the Colors palette is displayed.

If you hide the Colors palette, the command switches to Show|Palette.


Bitmap|Size and Attributes

The Bitmap|Size and Attributes command brings up the Set Bitmap Attributes dialog box.


Set Bitmap Attributes dialog box overview
Set Bitmap Attributes dialog box

The Set Bitmap Attributes dialog box is where you change a bitmap's size and attributes.

Size input boxes

The Size input boxes are where you choose the size of your bitmap.

Resize Current Bitmap check box

The Resize Current Bitmap check box resizes your bitmap.

Compression radio buttons

The Compression radio buttons compress your bitmap.

Colors radio buttons

The Colors radio buttons determine the number of colors in the image.

Format radio buttons

The Format radio buttons choose how to store your bitmap.

Device Info Button

The Device Info button displays information about your display hardware.


Size input boxes

The Size input boxes let you choose the bitmap's size.

Width in Pixels input box

The Width in Pixels input box is where you choose the bitmap's width.

Height in Pixels input box

The Height in Pixels input box is where you choose the bitmap's height.


Width in Pixels input box

Enter the width of the total bitmap image in the Width in Pixels input box. Enter the width in pixels.

The maximum size you can work with is limited by the amount of available memory on your computer. Even though you could type 9999 for the width of your image, the maximum size for bitmaps on your computer is probably far less.


Height in Pixels input box

Enter the height of the total bitmap image in the Height in Pixels input box. Enter the height in pixels.

The maximum size you can work with is limited by the amount of available memory on your computer. Even though you could type 9999 for the height of your image, the maximum size for bitmaps on your computer is probably far less.


Resize Current Bitmap check box

Turn on the Resize Current bitmap check box if you want an image that's already drawn to stretch or shrink when you resize your bitmap.

For example, if you create a 64 x 64 pixel bitmap, and you want the same image to fit into an area that's only half the size (32 x 32 pixels), turn on the Resize Current Bitmap check box when you specify the new size.


Compression radio buttons

The Compression radio buttons let you compress your bitmap images.

None

Turn on the None radio button if you're creating a 2-color bitmap.

RLE4

Turn on the RLE4 radio button if you're creating a 16-color bitmap.

RLE8

Turn on the RLE8 radio button if you're creating a 256-color bitmap.

RLE stands for "run length encoded."

You may want to experiment with both compressed and non-compressed color images because sometimes the compressed image takes up more space than the uncompressed image.


Colors radio buttons (Set Bitmap Attributes dialog box)
Colors radio buttons

The Colors radio buttons let you choose the image's color format.

2 Colors

Turn on the 2 Colors radio button if you want the bitmap to be a black and white image.

16 colors

Turn on the 16 Colors radio button if you want the bitmap to be a 16-color image.

256 colors

Turn on the 256 Colors radio button if you want the bitmap to be a 256-color image. This button is available only if your display hardware supports 256 colors. Your program must supply its own support for 256 colors.


Format radio buttons

The Format radio buttons let you choose how to store your bitmap.

Windows

Turn on the Windows radio button to store your bitmap in Windows format. The image can be compressed or in a format compatible with Windows.

OS/2

Turn on the OS/2 radio button to store your bitmap in OS/2 format. The image can be compressed or in a format compatible with OS/2.


Bitmap|Edit Foreground Color

The Bitmap|Edit Foreground Color command brings up the Edit Color dialog box, where you can edit the bitmap's foreground color.


Bitmap|Edit Background Color

The Bitmap|Edit Background Color command brings up the Edit Color dialog box, where you can edit the bitmap's background color.


Font menu overview
Font menu

The Font menu is displayed when you work with fonts.

Here are the Font menu options:

Hide Palette

Hide Toolbox

Header

Font Size

Character Width


Font|Hide Palette

The Font|Hide Palette command hides the Paint editor Colors palette. This command is available when the Colors palette is displayed.

If you hide the Colors palette, the command switches to Show|Palette.


Font|Header

The Font|Header command brings up the Font Header Information dialog box.


Font Header Information dialog box overview
Font Header Information dialog box

The Font Header Information dialog box is where you create header information for your font resource.

Attributes boxes

The Attributes boxes choose your font's attributes.

Copyright input box

The Copyright input box is where you enter copyright information.

Device input box

The Device input box is where you enter a device name for your font.

Face Name input box

The Face Name input box is where you assign a name to your font.

Font Version radio buttons

The Font Version radio buttons select the font's version.

Sizes input boxes

The Size input boxes define the size of characters in your font resource.

Type display box

The Type display box displays the type of the font.


Face Name input box

Enter the name of your font in the Face Name input box.

The face name is displayed on the status line at the top of the image.


Device input box

Enter a device name for your font in the Device input box. The device name informs your programs that this font can only be used on a particular device.


Copyright input box

Enter copyright information for your custom font in the Copyright input box.


Font Version radio buttons

The Font Version radio buttons let you choose the version of Windows under which the font was created.

2.00

Turn on the 2.00 radio button if you're running Windows Version 2.00.

3.00

Turn on the 3.00 radio button if you're running Windows Version 3.00.


Attributes boxes

The Attributes boxes tell Windows and your applications the attributes the font uses.

Character Set input box

The Character Set input box is where you select the font's character set.

Family input box

The Family input describes the font family.

Italic check box

The Italic check box implements italicized characters.

Strikeout check box

The Strikeout check box implements strikeout characters.

Underline check box

The Underline check box implements underlined characters.

Variable Pitch check box

The Variable Pitch check box creates characters of varying pitch.

Weight input box check box

The Weight input box is where you choose the weight of characters.


Italic check box (Font Header Information dialog box)
Italic check box

Turn on the Italic check box to indicate that the font contains italicized characters.


Underline check box (Font Header Information dialog box)
Underline check box

Turn on the Underline check box to indicate that the font contains underlined characters.


Strikeout check box (Font Header Information dialog box)
Strikeout check box

Turn on the Strikeout check box to indicate that the font contains characters that are struck out.


Variable Pitch check box

Turn on the Variable Pitch check box to indicate that the font is a variable pitch font.


Weight input box

Enter the weight of the font in the Weight input box.

-	Enter 400 if the font is of normal weight.

-	Enter 700 to indicate a boldfaced font.


Family input box

Enter the font's family in the Family input box. Enter one of the following values:

Value	Family Name	Description

1	Roman	Proportionally-spaced fonts with serifs.

2	Swiss	Proportionally-spaced fonts without serifs.

3	Modern	Fixed-pitch fonts.

4	Script	Cursive or script fonts.

5	Decorative	Novelty fonts.

Enter 0 (zero) if you're creating an image, rather than a character set.


Character Set input box

Enter the font's character set in the Character Set input box. Examples of character sets are Courier, Elite, and Pica.

The value can be from 0-255. However, only 0, 2, and 255 have predefined meanings:

Value	Description

0	ANSI, the default Windows character set

2	Symbol, used for math and scientific formulas

255	OEM, a machine specific character set


Sizes input boxes (Font Header Information dialog box)
Sizes input boxes

The Size input boxes let you choose the size of characters in your font resource.

Horizontal Resolution input box

The Horizontal Resolution input box is where you choose your font's horizontal resolution.

Vertical Resolution input box

The Vertical Resolution input box is where you choose your font's vertical resolution.

Points input box

The Points input box is where you choose your font's type size.

Internal Leading input box

The Internal Leading input box is where you choose the space reserved for diacritics.

External Leading input box

The External Leading input box is where you choose the number of spaces between lines.

Ascent input box

The Ascent input box is where you choose the height above the baseline.


Horizontal Resolution input box

Enter the horizontal number of pixels per logical inch on your video display in the Horizontal Resolution input box.


Vertical Resolution input box

Enter the vertical number of pixels per logical inch on your video display in the Vertical Resolution input box.


Points input box

Enter the font's type size in the Points input box. The size is based on a point, which is 1/72 of an inch. Characters are measured from the top of the ascender to the bottom of the descender.

Do not include the space reserved for diacritics. Enter that value in the Internal Leading input box.


Internal Leading input box

Enter the space reserved for diacritics in the Internal Leading input box. Enter the value in pixels.


External Leading input box

In the External Leading input box, enter the vertical distance from the bottom of one character cell to the top of the character cell below it. Enter the value in pixels.


Ascent input box

In the Ascent input box, enter the height of the character above the baseline. Enter the value in pixels.


Type display box

The Type display box displays the type of the font you're creating. Resource Workshop only creates and edits raster fonts.


Font|Font Size

The Font|Font Size command brings up the Font Size Information dialog box. where you choose the size for your font images.


Font Size Information dialog box overview
Font Size Information dialog box

The Font Size Information dialog box is where you choose the size for your font images.

The images in a font resource can vary in width or be all the same size.

Size input boxes

The Size input boxes are where you choose the font's size.

Stretch Current Characters check box

The Stretch Current Characters check box resizes the font.

Character input boxes

The Character input boxes are where you choose how many images to include in your font.


Size input boxes (Font Size Information dialog box)
Size input boxes

The Size input boxes let you choose the font's width, height, average width, and maximum width.

Width input box

The Width input box is where you enter the font's width.

Height input box

The Height input box is where you enter the font's height.

Average Width display box

The Average Width display box is where the font's average width is displayed.

Maximum Width input box

The Maximum Width input box is where you enter the font's maximum width.


Width input box (Font Size Information dialog box)
Width input box

If you want all images in your font resource to be the same width, enter the width in pixels in the Width input box.

If you want the widths to vary, enter a 0 (zero) here and enter a maximum width in the Maximum Width input box.

See Also

Creating a variable width font


Height input box

Enter the height of the font, in pixels, in the Height input box.


Average Width display box

If you entered 0 (a zero) in the Width input box, to indicate a variable-width font, Resource Workshop calculates an average width for your font images and displays it in the Average Width display box.

If you're not using a variable-width font, the value in the Average Width display box is the same as the value in the Width input box. The Average Width value is calculated when you open  the Font Size Information dialog box. You won't see this value change as you type other changes into the dialog box.


Maximum Width input box

If you entered 0 (a zero) in the Width input box to indicate a variable-width font, you also need to enter the maximum width for font images, in pixels, in the Maximum Width input box.

This option is available only if you entered 0 in the Width input box.


Stretch current characters check box (Font Size Information dialog box)
Stretch Current Characters check box

Turn the Stretch Current Characters check box on if you want existing images to stretch or shrink, based on height and width values you change in the Font Size Information dialog box.


Character input boxes

The Character input boxes options let you choose how many images to include in your font resource.

You use these input boxes to map your font images to the ANSI character set. For example, to map a font image to the character a, specify the decimal code 97. (The image itself needn't be the character a, unless you want it to be.) The second font image would then be mapped to the character b, decimal code 98.

The character you're editing is displayed on the status line at the top of the image.

First input box

The First input box maps the first image in your font resource to an ANSI character.

Last input box

The Last input box maps the last image in your font resource to an ANSI character.

Default input box

The Default input box is where you choose the default image that will be displayed when you edit this font resource.

Break input box

The Break input box is where you define a break character for your font resource.


First input box

In the First input box, enter an ANSI decimal code to define the first image in your font. For example, if you want the first image to correspond to a, type 97.


Last input box

In the Last input box, enter an ANSI decimal code to define the last image in your font. For example, if you want the last image to correspond to z, type 122.


Default input box

In the Default input box, enter an ANSI decimal code to define the default font image that will be displayed when you edit this font resource.

The Default value must be within the character range defined by the values entered in the First and Last input boxes.


Break input box

In the Break input box, enter an ANSI decimal code to define a break character for your font resource.

The Break value must be within the character range defined by the values entered in the First and Last input boxes.


Font|Character Width

The Font|Character Width command brings up the Character Width dialog box where you define a variable-width font.

This command is available only if you've entered 0 (a zero) in the Width input box in the Font Size Information dialog box.


Character Width dialog box overview
Character Width dialog box

The Character Width dialog box is where you define variable-width fonts.

Maximum Width display box

The Maximum Width display box displays the font's maximum width.

Width input box

The Width input box is where you enter the font's width.

Stretch Current Characters check box

The Stretch Current Characters check box resizes the font.


Maximum Width display box

The Maximum Width display box shows the value you entered in the Maximum Width input box in the Font Size Information dialog box.


Width input box (Character Width dialog box)
Width input box

The Width input box is where you choose a width for your font resource. Enter a value, in pixels, that's less than or equal to the value in the Maximum Width display box.


Stretch current characters check box (Character Width dialog box)
Stretch current characters check box

Turn the Stretch Current Characters check box on if you want existing images to stretch or shrink, based on new width value.